home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!ftpbox!news.acns.nwu.edu!nucsrl!ddsw1!shibumi
- From: shibumi@ddsw1.mcs.com (Michael Karrys)
- Subject: Need help with system() function call
- Message-ID: <C1Iwvx.7Ir@ddsw1.mcs.com>
- Date: Wed, 27 Jan 1993 17:35:56 GMT
- Organization: ddsw1.MCS.COM Contributor, Chicago, IL
- X-Newsreader: Tin 1.1 PL3
- Lines: 25
-
- I am trying to use the system() function call to send a print job into
- the background from a foreground running program. The problem I am running
- into is that any foreground open files cause the background program to
- stop and hang. The strange thing is that the background program runs fine
- as a foreground program and when run as a background program its file
- references are zero ( prior to opening were in it just hangs ).
-
- If I close the files in the foreground process prior to starting the
- background process everything works fine, however, this will
- cause a great deal of complexity in my programming. I have also tried
- unlocking tables and indexs in the foreground and background processes
- without any success.
-
- What I wanted was the background process to be completely separate program
- and not associate the file descriptors from the foreground. I want to send
- a string similar to this.
-
- system("backprog -p -w >/dev/null 2>&1 &");
-
- I would appreciate it if somebody could shed alittle light on this for me.
-
- thanks Mike Karrys
-
- P.S. I am using Codebase 4.2 C Library.
-
-