post.c 356 B

123456789101112131415161718192021222324
  1. #include <u.h>
  2. #include <libc.h>
  3. #include <fcall.h>
  4. #include <thread.h>
  5. #include <9p.h>
  6. #include "post.h"
  7. void
  8. postmountsrv(Srv *s, char *name, char *mtpt, int flag)
  9. {
  10. Postcrud *p;
  11. p = _post1(s, name, mtpt, flag);
  12. switch(rfork(RFPROC|RFNAMEG|RFMEM)){
  13. case -1:
  14. sysfatal("rfork: %r");
  15. case 0:
  16. _post2(s);
  17. exits(nil);
  18. default:
  19. _post3(p);
  20. }
  21. }