diff --git a/proc/BorderPanel.class b/proc/BorderPanel.class deleted file mode 100644 index 9444caae9..000000000 Binary files a/proc/BorderPanel.class and /dev/null differ diff --git a/proc/BorderPanel.java b/proc/BorderPanel.java deleted file mode 100644 index 67306e5ce..000000000 --- a/proc/BorderPanel.java +++ /dev/null @@ -1,67 +0,0 @@ -import java.awt.*; - -class BorderPanel extends Panel -{ - int border = 5; // size of border - Color col1 = Util.light_edge; - Color col2 = Util.dark_edge; - Color body; - - BorderPanel() - { - } - - BorderPanel(int w) - { - border = w; - } - - BorderPanel(int w, Color cb) - { - border = w; - body = cb; - } - - BorderPanel(int w, Color c1, Color c2) - { - border = w; - col1 = c1; col2 = c2; - } - - BorderPanel(int w, Color c1, Color c2, Color cb) - { - border = w; - col1 = c1; col2 = c2; body = cb; - } - - BorderPanel(Color c1, Color c2) - { - col1 = c1; col2 = c2; - } - - public Insets insets() - { - return new Insets(border+2, border+2, border+2, border+2); - } - - public void paint(Graphics g) - { - if (body != null) { - g.setColor(body); - g.fillRect(0, 0, size().width, size().height); - } - super.paint(g); - int w = size().width-1, h = size().height-1; - g.setColor(col1); - for(int i=0; i= 0 && y >= 0 && x < size().width && y < size().height) { - if (callback != null) - callback.click(this); - select(); - } - indent = false; - repaint(); - return true; - } - - public Dimension preferredSize() - { - return new Dimension(pwidth, pheight); - } - - public Dimension minimumSize() - { - return preferredSize(); - } - - private Dimension imgSize(int mw, int mh) - { - float ws = (float)mw/(float)iwidth, - hs = (float)mh/(float)iheight; - float s = ws < hs ? ws : hs; - if (s > 1) s = 1; - return new Dimension((int)(iwidth*s), (int)(iheight*s)); - } -} - - -interface CbButtonCallback -{ - void click(CbButton b); -} - - -class CbButtonGroup -{ - Vector buttons = new Vector(); - - void add(CbButton b) - { - buttons.addElement(b); - } - - void select(CbButton b) - { - for(int i=0; i num) lvisible = num; - checkValue(); - repaint(); - } - - public int getValue() { return value; } - - public void setValue(int v) - { - value = v; - checkValue(); - repaint(); - } - - private void checkValue() - { - if (value < 0) value = 0; - else if (value > num-lvisible) value = num-lvisible; - } - - public void paint(Graphics g) - { - if (num == 0) return; - int w = size().width, h = size().height; - boolean ins = inside && !(arrow1.inside || arrow2.inside); - Color c1 = ins ? hc1 : lc1, c2 = ins ? hc2 : lc2, - c3 = ins ? hc3 : lc3; - g.setColor(bc); - g.fillRect(0, 0, w, h); - g.setColor(c3); - g.drawLine(0, 0, w-1, 0); g.drawLine(0, 0, 0, h-1); - g.setColor(c1); - g.drawLine(w-1, h-1, w-1, 0); g.drawLine(w-1, h-1, 0, h-1); - - if (orient == VERTICAL) { - int va = h-w*2; - y1 = w+va*value/num; - y2 = w+va*(value+lvisible)/num-1; - g.setColor(c2); - g.fillRect(1, y1, w-2, y2-y1); - g.setColor(indent ? c3 : c1); - g.drawLine(1, y1, w-2, y1); - g.drawLine(1, y1, 1, y2-1); - g.setColor(indent ? c1 : c3); - g.drawLine(w-2, y2-1, w-2, y1); - g.drawLine(w-2, y2-1, 1, y2-1); - if (ins) { - g.drawLine(w-3, y2-2, w-3, y1+1); - g.drawLine(w-3, y2-2, 2, y2-2); - } - } - else if (orient == HORIZONTAL) { - int va = w-h*2; - x1 = h+va*value/num; - x2 = h+va*(value+lvisible)/num-1; - g.setColor(c2); - g.fillRect(x1, 1, x2-x1, h-2); - g.setColor(indent ? c3 : c1); - g.drawLine(x1, 1, x1, h-2); - g.drawLine(x1, 1, x2-1, 1); - g.setColor(indent ? c1 : c3); - g.drawLine(x2-1, h-2, x1, h-2); - g.drawLine(x2-1, h-2, x2-1, 1); - if (ins) { - g.drawLine(x2-2, h-3, x1+1, h-3); - g.drawLine(x2-2, h-3, x2-2, 2); - } - } - } - - /**Called by arrows to move the slider - */ - void arrowClick(int d) - { - int oldvalue = value; - value += d; - checkValue(); - if (value != oldvalue) { - callback.moved(this, value); - repaint(); - } - } - - public void reshape(int nx, int ny, int nw, int nh) - { - super.reshape(nx, ny, nw, nh); - if (orient == VERTICAL) { - arrow1.reshape(1, 1, nw-2, nw-1); - arrow2.reshape(1, nh-nw-1, nw-2, nw-1); - } - else { - arrow1.reshape(1, 1, nh-1, nh-2); - arrow2.reshape(nw-nh-1, 1, nh-1, nh-2); - } - repaint(); - } - - public Dimension preferredSize() - { - return orient==VERTICAL ? new Dimension(16, 100) - : new Dimension(100, 16); - } - - public Dimension minimumSize() - { - return preferredSize(); - } - - public boolean mouseDown(Event e, int mx, int my) - { - if (orient == VERTICAL) { - // move up/down one page, or start dragging - if (my < y1) arrowClick(-lvisible); - else if (my > y2) arrowClick(lvisible); - else { - indent = true; - drag = my-y1; - repaint(); - } - } - else { - // move left/right one page, or start dragging - if (mx < x1) arrowClick(-lvisible); - else if (mx > x2) arrowClick(lvisible); - else { - indent = true; - drag = mx-x1; - repaint(); - } - } - return true; - } - - public boolean mouseDrag(Event e, int mx, int my) - { - if (indent) { - int w = size().width, h = size().height; - int oldvalue = value; - if (orient == VERTICAL) { - int va = h-w*2, ny = my-drag-w; - value = ny*num/va; - } - else { - int va = w-h*2, nx = mx-drag-h; - value = nx*num/va; - } - checkValue(); - if (value != oldvalue) { - callback.moving(this, value); - repaint(); - } - } - return indent; - } - - public boolean mouseUp(Event e, int mx, int my) - { - if (indent) { - indent = false; - repaint(); - callback.moved(this, value); - return true; - } - return false; - } - -/* - public boolean mouseEnter(Event e, int mx, int my) - { - inside = true; - repaint(); - return true; - } - - public boolean mouseExit(Event e, int mx, int my) - { - inside = false; - repaint(); - return true; - } -*/ -} - -class CbScrollbarArrow extends Canvas implements Runnable -{ - int mode; - CbScrollbar scrollbar; - boolean inside, indent; - Thread th; - - CbScrollbarArrow(CbScrollbar p, int m) - { - scrollbar = p; - mode = m; - } - - public void paint(Graphics g) - { - int w = size().width, h = size().height; - Color c1 = inside ? scrollbar.hc1 : scrollbar.lc1, - c2 = inside ? scrollbar.hc2 : scrollbar.lc2, - c3 = inside ? scrollbar.hc3 : scrollbar.lc3; - g.setColor(scrollbar.bc); - g.fillRect(0, 0, w, h); - int xp[] = new int[3], yp[] = new int[3]; - // blank, dark, light - if (mode == 0) { - // up arrow - xp[0] = w/2; xp[1] = w-1; xp[2] = 0; - yp[0] = 0; yp[1] = h-1; yp[2] = h-1; - } - else if (mode == 1) { - // down arrow - xp[0] = 0; xp[1] = w/2; xp[2] = w-1; - yp[0] = 0; yp[1] = h-1; yp[2] = 0; - } - else if (mode == 2) { - // left arrow - xp[0] = 0; xp[1] = w-1; xp[2] = w-1; - yp[0] = h/2; yp[1] = h-1; yp[2] = 0; - } - else if (mode == 3) { - // right arrow - xp[0] = 0; xp[1] = w-1; xp[2] = 0; - yp[0] = 0; yp[1] = h/2; yp[2] = h-1; - } - g.setColor(c2); - g.fillPolygon(xp, yp, 3); - g.setColor(indent ? c1 : c3); - g.drawLine(xp[1], yp[1], xp[2], yp[2]); - g.setColor(indent ? c3 : c1); - g.drawLine(xp[0], yp[0], xp[2], yp[2]); - } - - public boolean mouseDown(Event e, int mx, int my) - { - indent = true; - repaint(); - (th = new Thread(this)).start(); - return true; - } - - public boolean mouseUp(Event e, int mx, int my) - { - indent = false; - repaint(); - if (th != null) th.stop(); - return true; - } - - /**Thread for doing repeated scrolling - */ - public void run() - { - int stime = 500; - while(true) { - scrollbar.arrowClick(mode%2 == 0 ? -1 : 1); - try { Thread.sleep(stime); } catch(Exception e) { } - stime = 100; - } - } -} - - -// CbScrollbarCallback -// Methods for reporting the movement of the scrollbar to another object -interface CbScrollbarCallback -{ - /**Called when the scrollbar stops moving. This happens when an - * arrow is clicked, the scrollbar is moved by a page, or the user - * lets go of the scrollbar after dragging it. - * @param sb The scrollar that has been moved - * @param v The new value - */ - void moved(CbScrollbar sb, int v); - - /**Called upon every pixel movement of the scrollbar when it is - * being dragged, but NOT when moved() is called. - * @param sb The scrollar that has been moved - * @param v The new value - */ - void moving(CbScrollbar sb, int v); -} - - diff --git a/proc/CbScrollbarArrow.class b/proc/CbScrollbarArrow.class deleted file mode 100644 index 1d814eccd..000000000 Binary files a/proc/CbScrollbarArrow.class and /dev/null differ diff --git a/proc/CbScrollbarCallback.class b/proc/CbScrollbarCallback.class deleted file mode 100644 index ffa8927a9..000000000 Binary files a/proc/CbScrollbarCallback.class and /dev/null differ diff --git a/proc/LineInputStream.class b/proc/LineInputStream.class deleted file mode 100644 index 35feed13f..000000000 Binary files a/proc/LineInputStream.class and /dev/null differ diff --git a/proc/LineInputStream.java b/proc/LineInputStream.java deleted file mode 100644 index 5b9311622..000000000 --- a/proc/LineInputStream.java +++ /dev/null @@ -1,81 +0,0 @@ -// LineInputStream -// A stream with some useful stdio-like methods. Can be used either for -// inheriting those methods into your own input stream, or for adding them -// to some input stream. -import java.io.InputStream; -import java.io.IOException; -import java.io.EOFException; - -public class LineInputStream -{ - InputStream in; - - LineInputStream(InputStream i) - { in = i; } - LineInputStream() - { } - - public int read() throws IOException - { return in.read(); } - public int read(byte b[]) throws IOException - { return in.read(b); } - public int read(byte b[], int o, int l) throws IOException - { return in.read(b, o, l); } - public long skip(long n) throws IOException - { return in.skip(n); } - public int available() throws IOException - { return in.available(); } - public void close() throws IOException - { in.close(); } - public synchronized void mark(int readlimit) - { in.mark(readlimit); } - public synchronized void reset() throws IOException - { in.reset(); } - public boolean markSupported() - { return in.markSupported(); } - - // gets - // Read a line and return it (minus the \n) - String gets() throws IOException, EOFException - { - StringBuffer buf = new StringBuffer(); - int b; - while((b = read()) != '\n') { - if (b == -1) throw new EOFException(); - buf.append((char)b); - } - if (buf.length() != 0 && buf.charAt(buf.length()-1) == '\r') - buf.setLength(buf.length()-1); // lose \r - return buf.toString(); - } - - // getw - // Read a single word, surrounded by whitespace - String getw() throws IOException, EOFException - { - StringBuffer buf = new StringBuffer(); - // skip spaces - int b; - do { - if ((b = read()) == -1) throw new EOFException(); - } while(Character.isSpace((char)b)); - // add characters - do { - buf.append((char)b); - if ((b = read()) == -1) throw new EOFException(); - } while(!Character.isSpace((char)b)); - return buf.toString(); - } - - // readdata - // Fill the given array completely, even if read() only reads - // some max number of bytes at a time. - public int readdata(byte b[]) throws IOException, EOFException - { - int p = 0; - while(p < b.length) - p += read(b, p, b.length-p); - return b.length; - } -} - diff --git a/proc/Makefile b/proc/Makefile deleted file mode 100644 index 0a5e4a3de..000000000 --- a/proc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -Tracer.class: Tracer.java - javac -target 1.1 -classpath . *.java diff --git a/proc/MultiColumn.class b/proc/MultiColumn.class deleted file mode 100644 index d1e661a93..000000000 Binary files a/proc/MultiColumn.class and /dev/null differ diff --git a/proc/MultiColumn.java b/proc/MultiColumn.java deleted file mode 100644 index 932b5a1cf..000000000 --- a/proc/MultiColumn.java +++ /dev/null @@ -1,589 +0,0 @@ -// MultiColumn -// A List box that supports multiple columns. -import java.awt.*; -import java.util.Vector; - -public class MultiColumn extends BorderPanel implements CbScrollbarCallback -{ - MultiColumnCallback callback; // what to call back to - String title[]; // column titles - boolean adjustable = true; - boolean drawlines = true; - Color colors[][] = null; - boolean enabled = true; - boolean multiselect = false; - int cpos[]; // column x positions - float cwidth[]; // proportional column widths - Vector list[]; // columns of the list - CbScrollbar sb; // scrollbar at the right side - int width, height; // size, minus the scrollbar - Insets in; // used space around the border - int sbwidth; // width of the scrollbar - int th; // height of title bar - Image bim; // backing image - Graphics bg; // backing graphics - Font font = new Font("timesRoman", Font.PLAIN, 12); - FontMetrics fnm; // drawing font size - int coldrag = -1; // column being resized - int sel = -1; // selected row - int sels[] = new int[0]; // all selected rows - int top = 0; // first row displayed - long last; // last mouse click time - int rowh = 16; // row height - Event last_event; // last event that triggered callback - int sortcol; // Column currently being sorted - int sortdir; // Sort direction (0=none, 1=up, 2=down) - - // Create a new list with the given column titles - MultiColumn(String t[]) - { - super(3, Util.dark_edge_hi, Util.body_hi); - title = new String[t.length]; - for(int i=0; i= top+r) { - top = s-1; - if (top > list[0].size() - r) - top = list[0].size() - r; - sb.setValue(top); - repaint(); - } - } - - // deleteItem - // Remove one row from the list - void deleteItem(int n) - { - for(int i=0; i 0) { - System.arraycopy(sels, 0, nsels, 0, i); - System.arraycopy(sels, i+1, nsels, i, - nsels.length-i); - sel = nsels[0]; - } - break; - } - } - repaint(); - compscroll(); - } - - // clear - // Remove everything from the list - void clear() - { - for(int i=0; i= top && sels[i] <= bot) { - bg.setColor(sels[i] == sel ? Util.body - : lighterGray); - bg.fillRect(0, th+(sels[i]-top)*rowh, - width, rowh); - } - } - } - - // Draw each column - for(int i=0; i w-3) - s = s.substring(0, s.length()-1); - if (!enabled) - bg.setColor(Util.body); - else if (colors != null) - bg.setColor(colors[j][i]); - bg.drawString(s, x+1, th+(j+1-top)*rowh-fd); - } - else if (o instanceof Image) { - // Render image in column - Image im = (Image)o; - bg.drawImage(im, x+1, th+(j-top)*rowh, this); - } - } - } - } - - // mouseDown - // Select a list item or a column to drag - public boolean mouseDown(Event e, int x, int y) - { - if (!enabled) { - return true; - } - x -= in.left; - y -= in.top; - coldrag = -1; - if (y < th) { - // Click in title bar - for(int i=0; i 0 && Math.abs(cpos[i] - x) < 3) { - // clicked on a column separator - coldrag = i; - } - else if (x >= cpos[i] && x < cpos[i+1]) { - // clicked in a title - callback.headingClicked(this, i); - } - } - } - else { - // Item chosen from list - int row = (y-th)/rowh + top; - if (row < list[0].size()) { - // Double-click? - boolean dclick = false; - if (e.when-last < 1000 && sel == row) - dclick = true; - else - last = e.when; - - if (e.shiftDown() && multiselect && sel != -1) { - // Select all from last selection to this one - int zero = sels[0]; - if (zero < row) { - sels = new int[row-zero+1]; - for(int i=zero; i<=row; i++) - sels[i-zero] = i; - } - else { - sels = new int[zero-row+1]; - for(int i=zero; i>=row; i--) - sels[zero-i] = i; - } - } - else if (e.controlDown() && multiselect) { - // Add this one to selection - int nsels[] = new int[sels.length + 1]; - System.arraycopy(sels, 0, nsels, 0,sels.length); - nsels[sels.length] = row; - sels = nsels; - } - else { - // Select one row only, and de-select others - sels = new int[1]; - sels[0] = row; - } - sel = row; - repaint(); - last_event = e; - if (callback != null) { - // Callback the right function - if (dclick) callback.doubleClick(this, row); - else callback.singleClick(this, row); - } - else { - // Send an event - getParent().postEvent( - new Event(this, - Event.ACTION_EVENT, - dclick?"Double":"Single")); - } - } - } - return true; - } - - // mouseDrag - // If a column is selected, change it's width - public boolean mouseDrag(Event e, int x, int y) - { - if (!enabled) { - return true; - } - x -= in.left; - y -= in.top; - if (coldrag != -1) { - if (x > cpos[coldrag-1]+3 && x < cpos[coldrag+1]-3) { - cpos[coldrag] = x; - cwidth[coldrag-1] = (cpos[coldrag]-cpos[coldrag-1]) / - (float)width; - cwidth[coldrag] = (cpos[coldrag+1]-cpos[coldrag]) / - (float)width; - repaint(); - } - } - return true; - } - - public void moved(CbScrollbar s, int v) - { - moving(s, v); - } - - public void moving(CbScrollbar s, int v) - { - top = sb.getValue(); - compscroll(); - repaint(); - } - - // compscroll - // Re-compute the size of the scrollbar - private void compscroll() - { - if (fnm == null) - return; // not visible - int r = rows(); - int c = list[0].size() - r; - sb.setValues(top, r==0?1:r, list[0].size()); - } - - // rows - // Returns the number of rows visible in the list - private int rows() - { - return Math.min(height/rowh - 1, list[0].size()); - } - - public Dimension minimumSize() - { - return new Dimension(400, 100); - } - - public Dimension preferredSize() - { - return minimumSize(); - } -} - -// MultiColumnCallback -// Objects implementing this interface can be passed to the MultiColumn -// class, to have their singleClick() and doubleClick() functions called in -// response to single or double click in the list. -interface MultiColumnCallback -{ - // singleClick - // Called on a single click on a list item - void singleClick(MultiColumn list, int num); - - // doubleClick - // Called upon double-clicking on a list item - void doubleClick(MultiColumn list, int num); - - // headingClicked - // Called when a column heading is clicked on - void headingClicked(MultiColumn list, int col); -} - diff --git a/proc/MultiColumnCallback.class b/proc/MultiColumnCallback.class deleted file mode 100644 index 97ced6301..000000000 Binary files a/proc/MultiColumnCallback.class and /dev/null differ diff --git a/proc/StringJoiner.class b/proc/StringJoiner.class deleted file mode 100644 index ad05397d9..000000000 Binary files a/proc/StringJoiner.class and /dev/null differ diff --git a/proc/StringSplitter.class b/proc/StringSplitter.class deleted file mode 100644 index 2ad4f3cbe..000000000 Binary files a/proc/StringSplitter.class and /dev/null differ diff --git a/proc/StringSplitter.java b/proc/StringSplitter.java deleted file mode 100644 index 48ba1e631..000000000 --- a/proc/StringSplitter.java +++ /dev/null @@ -1,103 +0,0 @@ -import java.util.Vector; - -// StringSplitter -// A stringsplitter object splits a string into a number of substrings, -// each separated by one separator character. Separator characters can be -// included in the string by escaping them with a \ -public class StringSplitter -{ - Vector parts = new Vector(); - int pos = 0; - - StringSplitter(String str, char sep) - { - this(str, sep, true); - } - - StringSplitter(String str, char sep, boolean escape) - { - StringBuffer current; - - parts.addElement(current = new StringBuffer()); - for(int i=0; i MAX_ROWS) { - buffer.removeElementAt(0); - } - } - else { - // Add immediately - log.addItem(row); - cleanup(); - log.scrollto(log.count()-1); - } - } - } - } - catch(EOFException e) { - // end of file .. - } - catch(IOException e) { - // shouldn't happen! - e.printStackTrace(); - } - } - - void cleanup() - { - while(log.count() > MAX_ROWS) { - log.deleteItem(0); - } - } - - public void click(CbButton b) { - if (b == pause) { - if (paused) { - // Resume display, and add missed stuff - pause.setText(" Pause "); - for(int i=0; i x2 ? x2 : i+s, y1); - for(i=y1; i<=y2; i+=s2) - g.drawLine(x2, i, x2, i+s > y2 ? y2 : i+s); - for(i=x2; i>=x1; i-=s2) - g.drawLine(i, y2, i-s < x1 ? x1 : i-s, y2); - for(i=y2; i>=y1; i-=s2) - g.drawLine(x1, i, x1, i-s < y1 ? y1 : i-s); - } - - static void recursiveLayout(Container c) - { - c.layout(); - for(int i=0; i$idfile"); - print IDFILE $$,"\n"; - close(IDFILE); - $SIG{'HUP'} = \&hup_handler; - } -$| = 1; -print "Content-type: text/plain\n\n"; -$trace = &open_process_trace($in{'pid'}, - $in{'syscalls'} ? [ split(/\s+/, $in{'syscalls'}) ] - : undef); -while($action = &read_process_trace($trace)) { - local $tm = strftime("%H:%M:%S", localtime($action->{'time'})); - print join("\t", $tm, $action->{'call'}, - join(", ", @{$action->{'args'}}), - $action->{'rv'}),"\n"; - } -&close_process_trace($trace); -unlink($idfile) if ($idfile); - -sub hup_handler -{ -&close_process_trace($trace); -unlink($idfile); -exit; -} - diff --git a/proc/trace.cgi b/proc/trace.cgi index da9915cd8..925cc54e4 100755 --- a/proc/trace.cgi +++ b/proc/trace.cgi @@ -3,12 +3,8 @@ require './proc-lib.pl'; &ReadParse(); -if ($config{'trace_java'}) { - &ui_print_header(undef, $text{'trace_title'}, "", "trace"); - } -else { - &ui_print_unbuffered_header(undef, $text{'trace_title'}, "", "trace"); - } +&ui_print_unbuffered_header(undef, $text{'trace_title'}, "", "trace"); + %pinfo = &process_info($in{'pid'}); &can_edit_process($pinfo{'user'}) || &error($text{'edit_ecannot'}); if (!%pinfo) { @@ -27,47 +23,28 @@ $syscalls = &ui_form_start("trace.cgi", "post")."\n". &ui_submit($text{'trace_change'})."\n". &ui_form_end()."\n"; -if ($config{'trace_java'}) { - # Output Java applet to show trace - print "",&text('trace_doing', "$pinfo{'args'}"),"
\n"; - print $syscalls; - print "\n"; - &seed_random(); - $id = int(rand()*1000000000); - print "\n"; - print "\n"; - if ($main::session_id) { - print "\n"; - } - print "$text{'trace_sorry'}

\n"; - print "

\n"; +@syscalls = $in{'all'} ? ( ) : split(/\s+/, $in{'syscalls'}); +$trace = &open_process_trace($in{'pid'}, + \@syscalls); +$fmt = "%-8.8s %-11.11s %-80.80s %-10.10s"; +print "",&text('trace_start', "$pinfo{'args'}"),"
\n"; +print $syscalls; +print "
";
+printf "$fmt\n", "Time", "System Call", "Parameters", "Return";
+printf "$fmt\n", ("-"x8), ("-"x11), ("-"x80), ("-"x10);
+while($action = &read_process_trace($trace)) {
+	local $tm = strftime("%H:%M:%S", localtime($action->{'time'}));
+	printf "$fmt\n", $tm, $action->{'call'},
+			 join(", ", @{$action->{'args'}}),
+			 $action->{'rv'};
+	}
+print "
"; +&close_process_trace($trace); +if (!kill(0, $in{'pid'})) { + print "$text{'trace_done'}
\n"; } else { - # Just display here as text - @syscalls = $in{'all'} ? ( ) : split(/\s+/, $in{'syscalls'}); - $trace = &open_process_trace($in{'pid'}, - \@syscalls); - $fmt = "%-8.8s %-11.11s %-80.80s %-10.10s"; - print "",&text('trace_start', "$pinfo{'args'}"),"
\n"; - print $syscalls; - print "
";
-	printf "$fmt\n", "Time", "System Call", "Parameters", "Return";
-	printf "$fmt\n", ("-"x8), ("-"x11), ("-"x80), ("-"x10);
-	while($action = &read_process_trace($trace)) {
-		local $tm = strftime("%H:%M:%S", localtime($action->{'time'}));
-		printf "$fmt\n", $tm, $action->{'call'},
-				 join(", ", @{$action->{'args'}}),
-				 $action->{'rv'};
-		}
-	print "
"; - &close_process_trace($trace); - if (!kill(0, $in{'pid'})) { - print "$text{'trace_done'}
\n"; - } - else { - print "$text{'trace_failed'}
\n"; - } + print "$text{'trace_failed'}
\n"; } &ui_print_footer("edit_proc.cgi?$in{'pid'}", $text{'edit_return'},