diff options
author | Mathieu Lonjaret <lejatorn@gmail.com> | 2009-09-12 15:25:51 -0400 |
---|---|---|
committer | Mathieu Lonjaret <lejatorn@gmail.com> | 2009-09-12 15:25:51 -0400 |
commit | 7b5db1c35abac2240fffbee2027c3e99b760863c (patch) | |
tree | 886260ba0d779ffad2b6efc34ee05578dc396902 /src/cmd | |
parent | 0cadb4301d18724e7513d7489cb5bebd262c82f1 (diff) | |
download | plan9port-7b5db1c35abac2240fffbee2027c3e99b760863c.tar.gz plan9port-7b5db1c35abac2240fffbee2027c3e99b760863c.tar.bz2 plan9port-7b5db1c35abac2240fffbee2027c3e99b760863c.zip |
libplumb, Mail: fix crash on nil plumb fids
http://codereview.appspot.com/116083
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/acme/mail/mail.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd/acme/mail/mail.c b/src/cmd/acme/mail/mail.c index 14ace323..474d8497 100644 --- a/src/cmd/acme/mail/mail.c +++ b/src/cmd/acme/mail/mail.c @@ -84,9 +84,12 @@ threadmain(int argc, char *argv[]) quotefmtinstall(); /* open these early so we won't miss notification of new mail messages while we read mbox */ - plumbsendfd = plumbopenfid("send", OWRITE|OCEXEC); - plumbseemailfd = plumbopenfid("seemail", OREAD|OCEXEC); - plumbshowmailfd = plumbopenfid("showmail", OREAD|OCEXEC); + if((plumbsendfd = plumbopenfid("send", OWRITE|OCEXEC)) == nil) + fprint(2, "warning: open plumb/send: %r\n"); + if((plumbseemailfd = plumbopenfid("seemail", OREAD|OCEXEC)) == nil) + fprint(2, "warning: open plumb/seemail: %r\n"); + if((plumbshowmailfd = plumbopenfid("showmail", OREAD|OCEXEC)) == nil) + fprint(2, "warning: open plumb/showmail: %r\n"); shortmenu = 0; srvname = "mail"; |