07-30-2008
system() fails
Hi,
I have the following code which fails with return value 1.
sprintf(tmp, "rm -rf %s/* 2>/dev/null\n", dest);
rc = system( tmp );
rc is 1
The files exist and the paths are correct. I can do a manual copy but the application fails. All the calls to system() function fail with the same return code. If I restart the application, this works fine.
On running truss, following is the output.
ioctl is failing with EIO error (Some Physical I/O error).
What could be the reason for this failure?
Thanks!
8287: 14.1724 vfork() = 16381
16381: 14.1724 vfork() (returning as child ...) = 8287
16381: 14.1777 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1778 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0x00020000 [0x00000000]
8287: 14.1783 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1789 execve("/bin/sh", 0xFFBFAA84, 0xFFBFDDAC) argc = 3
16381: rm -rf /usr/Dir_cp/* 2>>/usr/logs/audit080725
.
.
.
16381: 14.1881 getuid() = 110 [110]
16381: 14.1882 getuid() = 110 [110]
16381: 14.1882 getgid() = 110 [110]
16381: 14.1882 getgid() = 110 [110]
16381: 14.1884 ioctl(2, TCGETA, 0xFFBFDB8C) Err#5 EIO
16381: 14.1884 Received signal #1, SIGHUP [caught][/B]
16381: 14.1886 schedctl() = 0xFF26C000
16381: 14.1886 sigfillset(0xFF36FB20) = 0
16381: 14.1887 lwp_sigmask(SIG_SETMASK, 0x00020001, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1887 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
16381: 14.1888 sigaction(SIGHUP, 0xFFBFD5C0, 0xFFBFD660) = 0
16381: 14.1888 kill(16381, SIGHUP) = 0
16381: 14.1889 Received signal #1, SIGHUP [default]
16381: siginfo: SIGHUP pid=16381 uid=110
8287: 14.1893 waitid(P_PID, 16381, 0xFFBFA928, WEXITED|WTRAPPED) = 0
8287: 14.1894 sigaction(SIGINT, 0xFFBFA968, 0x00000000) = 0
8287: 14.1895 sigaction(SIGQUIT, 0xFFBFA968, 0x00000000) = 0
8287: 14.1895 schedctl() = 0xFED14000
8287: 14.1896 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I can not understand why my stat() function fails all the time when function tries to go recursevly. Someone suggested that it might be poiter problem. Please, look up my code at: www.donnelly.cc.ks.us/readdir_test.c. How can i solve this problem? Any suggestion are welcome!
Thank you... (3 Replies)
Discussion started by: solvman
3 Replies
2. UNIX for Advanced & Expert Users
Hi Exprts,
There's a critical problem on one of the Workstations that the client reports every morning their system is down.
It seems there's no power failure, as in the next startup the file systems are stable ,so i checked the "messages" file , the last line which i got before failure is :... (2 Replies)
Discussion started by: nikk
2 Replies
3. AIX
# mkvg -y temp_vg hdisk5
0516-1254 mkvg: Changing the PVID in the ODM.
0516-1207 mkvg: An invalid physical volume ID been detected on hdisk5.
0516-862 mkvg: Unable to create volume group.
???
What do I do? AIX 4.3.3
I have seen something like this before but I don't remember the... (2 Replies)
Discussion started by: osee
2 Replies
4. Shell Programming and Scripting
Hello .
Would really like to know why this code fails . I need to edit both the QUESNO : and <\p> tag at the same time .
open(TEXT, "<20030211.txt") || die ("Cannot open the text files");
while (<TEXT>) {
if ($_ =~ m/QUESNO :/) {
if ($_ =~ m/<\/p>/) {
print ($_);
... (0 Replies)
Discussion started by: whatsup
0 Replies
5. UNIX for Advanced & Expert Users
Hi
When im trying to do make --version and make --help in HP-UX
it throws error
Make: Unknown flag argument -. Stop.
a soft link is present in this directory /usr/bin/make
and hard link is in /usr/ccs/bin/make
what could be the reason can any1 ..please tell me how to solve this... (1 Reply)
Discussion started by: vasanthan
1 Replies
6. UNIX for Advanced & Expert Users
Hi,
I am trying to run a shell script on solaris,some time it works fine and some times it fails unexpectedly. There is a script called "autostart.sh" which automatically starts the Application server but some times the script fails to strat the application server. can anyone tell me what... (10 Replies)
Discussion started by: tahir23
10 Replies
7. Solaris
http://i44.tinypic.com/2cmq7vn.jpg
Please help me on this issue i'm using solaris on vmware x86 even i runed fsck on root disk like 'fsck -Y /dev/rdsk/c0d0s0 ' but again after reboot it is going to maintanance mode reply soon (6 Replies)
Discussion started by: knl.sundeep
6 Replies
8. Programming
Not sure in which forum to post this. I'm trying here, in Programming.
I'm working on a PC with Intel Duo processor & 2GB of ram. OS is Ubuntu 10.04.
I'm having problems with a C++ program that makes extensive use of realloc(). It happens that as soon as the overall memory allocated(OS +... (14 Replies)
Discussion started by: mamboknave
14 Replies
9. HP-UX
Hi,
I have written a simple program of 2 lines in C to load a library using SHL_LOAD.
It fails with error "/usr/lib/hpux32/dld.so: Unable to find library 'xyz.sl'.
Load failure for library , ERRNO = 2"
Shlib_PATH,LD_LIBRARY_PATH,PATH,LD_PRELOAD are set correctly and library exists on the... (0 Replies)
Discussion started by: ashwinichavan
0 Replies
10. AIX
Hello All,
I am trying to clone an entire AIX virtual machine to a new virtual machine including all partitions and OS.Can anyone help me on the procedure to follow? I am not really sure on how it can be done.Thanks in advance.
Please use CODE tags for sample input, sample output, and for code... (4 Replies)
Discussion started by: gull05
4 Replies