From: Michael John Haertel <mike@skinner.cs.uoregon.edu>
To: sam-fans@hawkwind.utcs.toronto.edu
Date: Mon, 12 Apr 1993 20:16:44 -0400 [thread overview]
Message-ID: <9304130016.AA27428@skinner.cs.uoregon.edu> (raw)
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 <sys/types.h>
#include <sys/stat.h>
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);
}
next reply other threads:[~1993-04-13 0:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-04-13 0:16 Michael John Haertel [this message]
1993-04-13 0:36 ` sam as a synchronous thing John Mackin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9304130016.AA27428@skinner.cs.uoregon.edu \
--to=mike@skinner.cs.uoregon.edu \
--cc=sam-fans@hawkwind.utcs.toronto.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).