mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
gefs: remove nokill code
After discussion, it was suggested that it might make more sense to handle the noswap stuff outside of gefs, like with any other fileserver. plan9 file-servers are not privileged. one might even run them in a test script to mount an image.
This commit is contained in:
parent
4ed03dff93
commit
a77fd25d90
3 changed files with 2 additions and 21 deletions
|
@ -118,4 +118,4 @@ if(test -e /cfg/$sysname/cpustart)
|
|||
|
||||
# mode of /proc/*/ctl is inherited across rfork, and sets modes on
|
||||
# other /proc files, such as note, so let listen be killed.
|
||||
dontkill '^(9660srv|cfs|cs|cwfs.*|disk|dns|dossrv|ether|factotum|hjfs|ipconfig|kb|kfs|mntgen|paqfs|reboot|usbd|venti|wpa)$'
|
||||
dontkill '^(9660srv|cfs|cs|cwfs.*|disk|dns|dossrv|ether|factotum|gefs|hjfs|ipconfig|kb|kfs|mntgen|paqfs|reboot|usbd|venti|wpa)$'
|
||||
|
|
|
@ -96,4 +96,4 @@ if(~ $terminal *reform*){
|
|||
reform/audio
|
||||
}
|
||||
|
||||
dontkill '^(9660srv|cfs|cs|cwfs.*|disk|dns|dossrv|ether|factotum|hjfs|ipconfig|kb|kfs|mntgen|paqfs|reboot|usbd|venti|wpa)$'
|
||||
dontkill '^(9660srv|cfs|cs|cwfs.*|disk|dns|dossrv|ether|factotum|gefs|hjfs|ipconfig|kb|kfs|mntgen|paqfs|reboot|usbd|venti|wpa)$'
|
||||
|
|
|
@ -47,23 +47,6 @@ _trace(char *msg, Bptr bp, vlong v0, vlong v1)
|
|||
t->v1 = v1;
|
||||
}
|
||||
|
||||
static void
|
||||
nokill(void)
|
||||
{
|
||||
char buf[128];
|
||||
int fd;
|
||||
|
||||
snprint(buf, sizeof(buf), "/proc/%d/ctl", getpid());
|
||||
if((fd = open(buf, OWRITE)) == -1){
|
||||
fprint(2, "nokill: open %s: %r", buf);
|
||||
return;
|
||||
}
|
||||
if(fprint(fd, "noswap\n") == -1){
|
||||
fprint(2, "nokill: write %s: %r", buf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static uvlong
|
||||
memsize(void)
|
||||
{
|
||||
|
@ -216,7 +199,6 @@ launch(void (*f)(int, void *), void *arg, char *text)
|
|||
if (pid < 0)
|
||||
sysfatal("can't fork: %r");
|
||||
if (pid == 0) {
|
||||
nokill();
|
||||
id = aincl(&fs->nworker, 1);
|
||||
if((*errctx = mallocz(sizeof(Errctx), 1)) == nil)
|
||||
sysfatal("malloc: %r");
|
||||
|
@ -408,7 +390,6 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
rfork(RFNOTEG);
|
||||
nokill();
|
||||
loadfs(dev);
|
||||
fs->wrchan = mkchan(32);
|
||||
fs->admchan = mkchan(32);
|
||||
|
|
Loading…
Reference in a new issue