Well, the command shell gives you additional services, such as the built-in 
shell commands and redirect of stdout to file, piping, etc.  The non-shell 
versions do not.

shell_jtask_ uses spawn_jtask_.  spawn_jtask_ creates an input and output pipe 
to optionally pass commands and retrieve output.

fork_jtask_ just kicks of a task and optionally waits for it to complete.  No 
stdin or stdout are supported.
--
David

On 11/5/2011 13:12, Skip Cave wrote:
> What are the ramifications of executing a program from the command shell,
> as opposed to directly executing it? Do both methods provide the calling
> process access to stdout? Are there other differences?
>
> Skip
>
> On Sat, Nov 5, 2011 at 9:34 AM, David Mitchell<[email protected]>wrote:
>
>> Skip,
>>
>> There is some documentation to be found by looking at the jtask.ijs script
>> via
>> this command:
>>
>> open 'jtask'
>>
>> In one of the windowing interfaces.
>>
>> In general, they all use the Windows function CreateProcess:
>>
>> "Creates a new process and its primary thread. The new process runs in the
>> security context of the calling process."
>>
>> fork and spawn execute a program directly.  shell uses the 'cmd' shell to
>> execute programs or shell commands.
>> --
>> David Mitchell
>>
>> On 11/5/2011 0:38, Skip Cave wrote:
>> snip
>>> Several methods to run command-line tasks were mentioned previously in
>> this
>>> thread, including spawn, fork, shell, and spawn_jtask_. The documentation
>>> was not clear on the differences between all these different verbs, so I
>>> attacked the problem by trial and error. Is there a doc somewhere, that
>>> explains when to use each of these nouns, and the pros and cons of each
>> one?
>> snip
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to