Reorganize to remove DIKU specific naming
[remote/remote-mci.git] / mch / notify / notify.c
blobefb9717ec28ba1b91ac10563aba7a63ca58b0f59
1 #include <unistd.h>
2 #include <sys/types.h>
3 #include <sys/stat.h>
4 #include <fcntl.h>
5 #include <unistd.h>
7 int plugpipe;
9 int main(int argc, char* argv[])
11 if (argc<1) return -1;
12 // wait a bit before attempting to write
13 usleep(5000000);
14 plugpipe = open(argv[1],O_WRONLY | O_NONBLOCK);
15 if ( plugpipe < 0 )
17 return -2;
20 if ( write(plugpipe,"p",1) < 1)
22 close(plugpipe);
23 return -3;
25 close(plugpipe);
26 return 0;