> rm and cp return non zero values sometimes. > > sprintf(tmp, "rm -rf %s/* 2>/dev/null\n", dest); > rc = system( tmp ); > rc = 1 > > sprintf(tmp, "cp -r %s/* %s 2>/dev/null", source, > dest); > rc = system( tmp ); > rc = 1 > > The files exist and the paths are correct. I can do a > manual copy but the application fails. If I restart > the application, this works fine. > Can anyone tell why this could happen?
Try adding truss -eafl -o /tmp/out.truss to your "rm -rf %s/* 2>/dev/null\n" for sprintf sprintf(tmp, "/bin/truss -eafl -o /tmp/out.truss /bin/rm -rf %s/* 2>/dev/null\n", dest); does it not happen on non recurive removes and copies? What shell are you using?, try /bin/sh go back to basic shell! This message posted from opensolaris.org _______________________________________________ opensolaris-help mailing list [email protected]
