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]