From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from skinner.cs.uoregon.edu ([128.223.4.13]) by hawkwind.utcs.toronto.edu with SMTP id <2755>; Mon, 12 Apr 1993 20:17:00 -0400 Received: from atlantix.cs.uoregon.edu by skinner.cs.uoregon.edu with SMTP id AA27428 (5.65/IDA-1.4.2 for sam-fans@hawkwind.utcs.toronto.edu); Mon, 12 Apr 93 17:16:44 -0700 Date: Mon, 12 Apr 1993 20:16:44 -0400 From: Michael John Haertel Message-Id: <9304130016.AA27428@skinner.cs.uoregon.edu> To: sam-fans@hawkwind.utcs.toronto.edu rsalz wrote: >How do I >tell the "editor" that I'm done editing? This is the best solution I've come up with. #! /bin/sh B $1 waitforchanges $1 where "waitforchanges" is the following small C program: #include #include main(int argc, char *argv[]) { struct stat ost, nst; if (argc != 2) exit(1); if (stat(argv[1], &ost) < 0) exit(1); for (;;) { sleep(3); if (stat(argv[1], &nst) < 0) exit(1); if (nst.st_mtime != ost.st_mtime) break; } exit(0); }