help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get octave PID inside octave


From: John W. Eaton
Subject: Re: How to get octave PID inside octave
Date: Fri, 18 Aug 2006 18:17:58 -0400

On 18-Aug-2006, Joshua Rigler wrote:

| Quentin Spencer wrote:
| > I'm trying to run the same script in separate instances of octave 
| > running on the same multiprocessor machine, and I would like to 
| > periodically save my results to a file, and would like the script to 
| > generate a different file name in each instance of octave. It seems like 
| > one way to do this would be to create a file name that contains the 
| > octave PID. Is there a way to gain access to the PID from within octave? 
| > Any other ideas for how to accomplish this?
| > 
| > Quentin
| 
| 
| If you're running a Bash shell, you can always use
| 
|    >> OCT_PID = system('echo $PPID');
| 
| I'm not sure how portable that is though.

How about just using Octave's getpid () function?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]