tcl.lang.cmd
Class PidCmd
java.lang.Object
tcl.lang.cmd.PidCmd
- All Implemented Interfaces:
- Command
public class PidCmd
- extends Object
- implements Command
implement TCL 'pid' command. JVM doesn't support PID queries directly so we
play some tricks here. If pid can't be found, -1 (or a list of -1) is
returned
- Author:
- danb
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PidCmd
public PidCmd()
getPid
public static int getPid()
- Returns:
- PID of the TCL process, or -1 if it can't be determined
cmdProc
public void cmdProc(Interp interp,
TclObject[] objv)
throws TclException
- Description copied from interface:
Command
- This method implements the functionality of the command. However, calling
it directly in application code will bypass execution traces. Instead,
commands should be called with WrappedCommand.invoke
- Specified by:
cmdProc
in interface Command
- Parameters:
interp
- The interpreter for setting the results and which contains the
contextobjv
- the argument list for the command; objv[0[ is the command name
itself
- Throws:
TclException
- on any errors
Copyright © 2015. All rights reserved.