1. mpstevens_uk
  2. srw

Commits

Evan Gates  committed 73d1ecd

not a fan of the sigwinch stuff, keep it simple, use ^L if you need to

  • Participants
  • Parent commits 180bb86
  • Branches default

Comments (0)

Files changed (2)

File srw.1

View file
  • Ignore whitespace
 .SY srw
 .OP \-p prompt
 .OP \-v
-.OP \-w
 .I cmd
 .RI [ args... ]
 .YS
 .TP
 .B \-v
 print version information and exit
-.TP
-.B \-w
-for each SIGWINCH received (window resize), clear screen and send SIGWINCH to the child process group
 
 .SH USAGE
 srw supports the usual arrow keys, Home, End, Delete, as well as the following shortcuts

File srw.c

View file
  • Ignore whitespace
 
 void usage(void)
 {
-	printf("Usage: srw [-p prompt] [-w] cmd [args]...\n");
+	printf("Usage: srw [-p prompt] cmd [args]...\n");
 	exit(1);
 }
 
-void sigwinch(int unused)
-{
-	cursor_org();
-	cursor_clr();
-	fflush(stdout);
-	kill(-child, SIGWINCH);
-}
-
 void sigchld(int unused)
 {
 	pid_t pid;
 		switch (argv[i][1]) {
 			case 'p' : nrml_prompt = argv[++i]; break;
 			case 'v' : printf("srw-"VERSION" © Evan Gates\n"); exit(1);
-			case 'w' : if (signal(SIGWINCH, sigwinch) == SIG_ERR)
-						   err(1, "failed to install SIGWINCH handler");
-					   break;
 			default  : usage();
 		}
 	}