fgui: check if fd is valid before entering new key
This commit is contained in:
parent
d3773c4355
commit
e1bc28d1dd
1 changed files with 5 additions and 3 deletions
|
@ -792,10 +792,12 @@ needkey(Request *r)
|
|||
entry[i].a->type = AttrNameval;
|
||||
}
|
||||
|
||||
/* enter the new key !!!!need to do something in case of error!!!! */
|
||||
/* enter the new key */
|
||||
fd = open("/mnt/factotum/ctl", OWRITE);
|
||||
fprint(fd, "key %A", r->a);
|
||||
close(fd);
|
||||
if(fd >= 0){
|
||||
fprint(fd, "key %A", r->a);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
teardownneedkey(r);
|
||||
out:
|
||||
|
|
Loading…
Reference in a new issue