* Owning and controlling child processes in scripts?
@ 2009-04-03 18:52 Johann "Myrkraverk" Oskarsson
2009-04-03 18:58 ` Mikael Magnusson
0 siblings, 1 reply; 2+ messages in thread
From: Johann "Myrkraverk" Oskarsson @ 2009-04-03 18:52 UTC (permalink / raw)
To: Zsh Users
Hi all,
Is it possible to keep a child process, and communicate with it using
stdin and stdout in a script?
More specifically, can I spawn a sqlite process, and pipe into it an
sql command, as needed? Or am I condemned to spawn a new process on
each command?
Johann
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Owning and controlling child processes in scripts?
2009-04-03 18:52 Owning and controlling child processes in scripts? Johann "Myrkraverk" Oskarsson
@ 2009-04-03 18:58 ` Mikael Magnusson
0 siblings, 0 replies; 2+ messages in thread
From: Mikael Magnusson @ 2009-04-03 18:58 UTC (permalink / raw)
To: Johann Myrkraverk Oskarsson; +Cc: Zsh Users
2009/4/3 Johann "Myrkraverk" Oskarsson <johann@myrkraverk.com>:
> Hi all,
>
> Is it possible to keep a child process, and communicate with it using
> stdin and stdout in a script?
>
> More specifically, can I spawn a sqlite process, and pipe into it an
> sql command, as needed? Or am I condemned to spawn a new process on
> each command?
Look up coproc
simple example
% coproc cat
% echo hello >&p
% cat <&p
hello
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-03 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-03 18:52 Owning and controlling child processes in scripts? Johann "Myrkraverk" Oskarsson
2009-04-03 18:58 ` Mikael Magnusson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).