Re: error with system() command: Resource temporarily unavailable
From: Arti Potnis (artpot78_at_yahoo.com)
Date: 07/07/04
- Next message: Mario Pranjic: "Re: apache 2.0.50 and php 4.3.7 with gd support problem"
- Previous message: Michael E. Thomadakis: "NFS on IA-64 Linux and other UNIX systems"
- In reply to: Steve N.: "Re: error with system() command: Resource temporarily unavailable"
- Next in thread: Villy Kruse: "Re: error with system() command: Resource temporarily unavailable"
- Reply: Villy Kruse: "Re: error with system() command: Resource temporarily unavailable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 6 Jul 2004 23:01:07 -0700
steven_nospam@yahoo.ca (Steve N.) wrote in message news:<a7f2ae7e.0407060712.4b795ba6@posting.google.com>...
> artpot78@yahoo.com (Arti Potnis) wrote in message news:<ece8ea46.0407060151.1efe110b@posting.google.com>...
> <snip>
> > We are running a C program on AIX version 4.3 and calling an exe using
> > the system command.
> > This returns with errno=11 Resource temporarily unavailable
> > the same command runs fine on the shell prompt.
> > thanks in advance
> > Arti
>
> What does your C program do (or supposed to do)? Does it try to access
> a tape drive, CDROM, network card, etc? I usually get the "Resource
> temporarily unavailable" when I try to run a backup command (tar,
> cpio, etc) on a tape drive that is already in use by another backup or
> restore.
>
> In other words, you are trying to access a resource on the system that
> is limited to maybe one PID using it at a time. By calling the exe
> within the C program, perhaps both are trying to use the same resource
> (one opens it but does not release it before the other tries to access
> it).
>
> HTH.
>
> Steve
------------------------------------------------------------------------------
Our C program is calling a c++ exe (myprog.exe).
The exe does the following:-
-It opens a text file,reads it line by line and checks if the
parameter passed to the program exists in the line.
-If it exists it deletes the line.
-To delete the line it just stores the lines not containing the
parameter in a vector,opens the text file again in write mode (so that
it gets truncated) and writes the contents of the vector to the file.
I'm getting this problem in a number of other places too.For instance
there is a program which runs a
system("grep -i 'pattern' myfile")
If the pattern exists it returns the result but if it doesn't then it
returns errno=11.
No other program accesses the file being grepped.
--------------------------------------------------------------------------------
- Next message: Mario Pranjic: "Re: apache 2.0.50 and php 4.3.7 with gd support problem"
- Previous message: Michael E. Thomadakis: "NFS on IA-64 Linux and other UNIX systems"
- In reply to: Steve N.: "Re: error with system() command: Resource temporarily unavailable"
- Next in thread: Villy Kruse: "Re: error with system() command: Resource temporarily unavailable"
- Reply: Villy Kruse: "Re: error with system() command: Resource temporarily unavailable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|