the foreign conjunction:
2!:0 y Host. The list y is executed by the host system, and
the result is returned. For example, 2!:0 'dir *.exe'.
2!:1 y Spawn. (Unix only.) Like 2!:0, but yields '' without
waiting for the host to finish. Any output is ignored.
For example, 2!:1 can be used to invoke a text-editor.
But in jtask script
NB.*fork v run task and optionally wait for completion
NB.
NB. form: [timeout=0] fork cmdline
NB.
NB. timeout: 0 no wait, _1 infinite, >0 timeout
NB. cmdline: 'shortcmd arg1 arg2 ...'
NB. cmdline: '"command with space" arg1 ...'
NB.
NB. e.g. fork 'notepad.exe'
NB. =========================================================
NB.*spawn v [monad] get stdout of executed task
NB.
NB. form: stdout=. spawn cmdline
NB.
NB. stdout: _1 fail, '' or stdout stream value if success
NB. cmdline: 'shortcmd arg1 arg2 ...'
NB. cmdline: '"command with space" arg1 ...'
I would say 'spawn' meant 'fork' which will not return useful result
other than exit code, while 'host' or 'sytemcall' does. At least the
use of 'spawn' in jtask in confusing under linux in that it exports the
verb spawn to z locale to mean 2!:0
spawn=: (3 : 0)`(2!:0...@])@.IFUNIX
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩147 司空曙 雲陽館與韓紳宿別
故人江海別 幾度隔山川 乍見翻疑夢 相悲各問年
孤燈寒照雨 深竹暗浮煙 更有明朝恨 離杯惜共傳
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm