10 note(int pid, char *msg, char *fmt)
15 sprintf(pname, fmt, pid);
16 f = open(pname, O_WRONLY);
21 if(msg != 0 && write(f, msg, strlen(msg)) < 0){
31 kill(pid_t pid, int sig)
39 msg = _sigstring(sig);
49 if(setpgid(mpid, -pid) == 0) {
50 r = note(mpid, msg, "/proc/%d/notepg");
56 r = note(getpid(), msg, "/proc/%d/notepg");
58 r = note(pid, msg, "/proc/%d/note");