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

Re: SPAWN under Unix question

Yes, IDL execution is suspended when you run a command via SPAWN.
*Unless* you use the UNIT keyword, *or* you explicitly put the command
in the background by using "&" in the command line.


Paul van Delst <pvandelst@ncep.noaa.gov> writes:
> Hey there,
> I want to execute some system commands (cp, tar, rm) using SPAWN on a
> Linux system. Does IDL execution suspend while the OS command is
> executing? The reason I ask is my IDL code copies some files, tar's them
> up, then deletes the files. If the spawn works in the background, things
> can get quite muddled.
> The documentation states:
> "If Command is not present, SPAWN starts an interactive command
> interpreter process. Under UNIX, the default shell is used. IDL
> execution suspends until the new shell process terminates. Under UNIX,
> shells that handle process suspension (e.g., /bin/csh) offer a more
> efficient way to get the same effect."
> but it doesn't say what happens if "command" is not present.
> paulv
> p.s. I really should pull my finger out and learn Perl, but IDL is so
> easy to use.....
> -- 
> Paul van Delst           Ph:  (301) 763-8000 x7274
> CIMSS @ NOAA/NCEP        Fax: (301) 763-8545
> Rm.202, 5200 Auth Rd.    Email: pvandelst@ncep.noaa.gov
> Camp Springs MD 20746

Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response