On 10/31/06, art sm <[EMAIL PROTECTED]> wrote:
On 10/31/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> On 10/31/06, art sm <[EMAIL PROTECTED]> wrote:
> > On 10/30/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > > On 10/30/06, art sm <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I'm having trouble trying to fork a process from gui vim on solaris.
> > > >
> > > > For example, if I start gvim, and use do:
> > > > :!touch touchtest1 &
> > > >
> > > > will work, but any subsequent fork commands fail:
> > > > :!touch touchtest2 &
> > > >
> > > > does not create the touchtest2 file.
> > > Are subsequent non-& :! commands affected too ? For example
> > > :!touch x1 &
> > > :!ls
> > > Does 2nd command(:!ls) work ?
> > >
> > > Yakov
> >
> > Subsequent non-& are not affected. In the above case (:!ls) will be 
successful.
> >
> What happens if you wrap &-commands into 1-liner scripts and
> invoke them from :! without & ? Does it work, as a workaround ?
> Like this:
>
> :!bg.sh touch file1
>
> where bg.sh is this script:
>
> #!/bin/sh
> "$@" & # invoke command given in argv asynchronously
>
> Does this work ?
> Yakov
>

No, that has the same results. It works the first time, but any
subsequent commands do not work.

Any subsequent synchronous commands do not work,
or any subsequent  async (&) commands do not work ?

Can you possibly try strace to see exacty why exactly 2nd command
loses its tracks:
:!strace -f sh -c 'touch xyz&"
?
Yakov

Reply via email to