003 File Manager
Current Path:
/usr/share/examples/sunrpc/msg
usr
/
share
/
examples
/
sunrpc
/
msg
/
📁
..
📄
Makefile
(712 B)
📄
msg.x
(183 B)
📄
msg_proc.c
(594 B)
📄
printmsg.c
(753 B)
📄
rprintmsg.c
(1.56 KB)
Editing: msg_proc.c
/* @(#)msg_proc.c 2.1 88/08/11 4.0 RPCSRC */ /* $FreeBSD$ */ /* * msg_proc.c: implementation of the remote procedure "printmessage" */ #include <paths.h> #include <stdio.h> #include <rpc/rpc.h> /* always need this here */ #include "msg.h" /* need this too: msg.h will be generated by rpcgen */ /* * Remote version of "printmessage" */ int * printmessage_1(msg) char **msg; { static int result; /* must be static! */ FILE *f; f = fopen(_PATH_CONSOLE, "w"); if (f == NULL) { result = 0; return (&result); } fprintf(f, "%s\n", *msg); fclose(f); result = 1; return (&result); }
Upload File
Create Folder