History

page: needs seeking? write to a temp file

Sigrid Haflínudóttir committed 6 years ago

Commit 248f28e1 parent 20359a51 file · +4 −1Browse files

Unified · Split

main.c+4−1
@@ -266,8 +266,11 @@ void · 265 unmodified lines
266page(Response *r)266page(Response *r)
267{267{
268 if(rfork(RFPROC|RFFDG|RFNOTEG|RFNOWAIT) == 0){268 if(rfork(RFPROC|RFFDG|RFNOTEG|RFNOWAIT) == 0){
269 char tmp[32] = "/tmp/gem9XXXXXXXXXXX", *cmd;
270 mktemp(tmp);
271 cmd = smprint("cat >%s >[2]/dev/null; page -w %s; rm %s", tmp, tmp, tmp);
269 dup(r->fd, 0); close(r->fd);272 dup(r->fd, 0); close(r->fd);
270 execl("/bin/page", "page", "-w", nil);273 execl("/bin/rc", "rc", "-c", cmd, nil);
271 }274 }
272}275}
273 276

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t