9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] command output on acme
Date: Fri,  8 May 2009 08:31:54 -0700	[thread overview]
Message-ID: <dd6fe68a0905080831q248a6ac2vebc5e4c171f697cd@mail.gmail.com> (raw)
In-Reply-To: <138575260905080241l370fa5d9re4a5011c49949ca3@mail.gmail.com>

win takes a command to run as an argument.

win tail -f yourfile

would be almost exactly what you want.
You'd just delete the window when you're done watching.

The only problem is that on Plan 9, Del in the
new window doesn't send a "hangup" note to tail,
but it should.

% diff -c /n/sources/plan9/acme/bin/source/win/main.c .
/n/sources/plan9/acme/bin/source/win/main.c:107,112 - ./main.c:107,113
  	while(*s==' ' || *s=='\t' || *s=='\n')
  		s++;
  	if(strcmp(s, "Delete")==0 || strcmp(s, "Del")==0){
+ 		write(notepg, "hangup", 6);
  		windel(w, 1);
  		threadexitsall(nil);
  		return 1;
%

Russ


  parent reply	other threads:[~2009-05-08 15:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08  9:41 hugo rivera
2009-05-08 14:34 ` Anthony Sorace
2009-05-08 14:50 ` erik quanstrom
2009-05-08 15:31 ` Russ Cox [this message]
2009-05-08 15:33 ` roger peppe
2009-05-08 18:59   ` Rob Pike
2009-05-11 14:03     ` hugo rivera

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=dd6fe68a0905080831q248a6ac2vebc5e4c171f697cd@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /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).