[sf-perl] simultaneous processes?

Richard Reina gatorreina at gmail.com
Fri Mar 5 10:43:36 PST 2010


The solution below works. But when I have to pass a scalar to the program it
does not.  For example if I do something like:
 perl -e'system(q{ ( evince $file & ) ; xlogo });'

evince opens with this error Unhandled MIME type: "x-directory/normal"

Does any one know how I can remedy this?

Thanks.

Richard



2010/3/4 Mark Grimes <mgrimes at cpan.org>

> There are better ways of dealing with this (forking, one of the IPC
> modules, etc), but these are a quick and dirty way to do what you
> want:
>
>  perl -e'system(q{sh -c "( xlogo & ) ; xlogo "});'
>  perl -e'system(q{ ( xlogo & ) ; xlogo });'
>
> (Replacing the xlogo commands with evice and terminal, of course.)
>
>
> 2010/3/4 Richard Reina <gatorreina at gmail.com>:
> > I use evince to view a good number of tiff files.  I have written a quick
> > little script to help me associate the tiff files with various database
> > records.  This script runs as part of larger API that runs in a very
> minimal
> > xwindows system ( no desktop just twm as a window manager.) As it stands
> now
> > I view the file with system("evince file.tiff"); close evince and execute
> > the script which helps me associate and save the file.  I was wondering
> if
> > there is a way to for my script to open a terminal while evince is still
> > open so I can still look at the file while I'm saving it.
> >
> > I've tried system("evince file.tiff & gnome-teminal
> --geometry=50x35-0+0");
> > but then I don't see evince.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> >
> > Richard
> >
> > _______________________________________________
> > SanFrancisco-pm mailing list
> > SanFrancisco-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
> >
> >
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20100305/c6b91e8c/attachment.html>


More information about the SanFrancisco-pm mailing list