Changeset 8590


Ignore:
Timestamp:
02/16/05 19:43:33 (16 years ago)
Author:
piso
Message:

listThreads(): added SunOS support (Manpreet Singh).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/Debug.java

    r703 r8590  
    22 * Debug.java
    33 *
    4  * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: Debug.java,v 1.6 2003-02-12 15:09:33 piso Exp $
     4 * Copyright (C) 1998-2005 Peter Graves
     5 * $Id: Debug.java,v 1.7 2005-02-16 19:43:33 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    115115        }
    116116        int processCount = 0;
     117        String output = null;
    117118        if (Platform.isPlatformLinux()) {
    118119            String[] cmdarray = {"bash", "-c",
    119120                "ps -o pid,pri,%cpu,rss,start,time,command"};
    120             String output = Utilities.exec(cmdarray);
     121            output = Utilities.exec(cmdarray);
     122        } else if (Platform.isPlatformSunOS()) {
     123            String[] cmdarray = {"sh", "-c",
     124                "ps -efo pid,pri,pcpu,rss,time,args"};
     125            output = Utilities.exec(cmdarray);
     126        }
     127        if (output != null) {
    121128            FastStringReader reader = new FastStringReader(output);
    122129            String s = reader.readLine();
Note: See TracChangeset for help on using the changeset viewer.