return -1;
return do_rename(from, to);
#endif
- }
-
-
-/* sleep for a while via select */
-void u_sleep(int usec)
-{
- struct timeval tv;
-
- tv.tv_sec = 0;
- tv.tv_usec = usec;
- select(0, NULL, NULL, NULL, &tv);
}
/****************************************************************************
like waitpid but does the WEXITSTATUS
****************************************************************************/
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(stat) ((int)(((stat)>>8)&0xFF))
+#endif
void wait_process(pid_t pid, int *status)
{
waitpid(pid, status, 0);