comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » SPAWN background command without nohup?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: SPAWN background command without nohup? [message #88866 is a reply to message #88861] Mon, 30 June 2014 02:34 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On Saturday, June 28, 2014 5:27:48 PM UTC+2, David Grier wrote:
> Dear Folks,
>
>
>
> Using SPAWN to start a background process on unix-like systems
>
> can leave the process running even after the IDL process terminates.
>
> I'd like to arrange things so that the child process is killed when IDL exits.
>
>
>
> Here's a schematic example:
>
>
>
> IDL> spawn, 'myprocess &', pid=pid
>
> IDL> print, pid
>
> 62417
>
> IDL> exit
>
>
>
> $ ps | grep 62417
>
> grier 62417 0.0 0.1 2473856 12320 ?? S 10:41AM 0:00.02 myprocess
>
>
>
> This is similar to running a shell command with nohup:
>
> $ nohup myprocess &
>
> $ exit
>
>
>
> Is there a way to make IDL spawn a child process that terminates when
>
> the parent IDL session terminates?
>
>
>
> All the best,
>
>
>
> David

You might try to keep your spawned process synchronized with the parent IDL session : maybe by using the UNIT keyword ?
Just a guess, I have no experience with unix.
alx.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with SPAWN command in IDL code
Next Topic: Problem in performing band operation on image file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:56:02 PDT 2025

Total time taken to generate the page: 1.52365 seconds