Commit 8e28453b authored by 马伊齐's avatar 马伊齐

进程间信号通信Demo(完成)

parent f3df337e
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <poll.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include "../lib/sock_msg.h"
int main()
{
uint16_t type = 1;
u_int32_t code = 1;
msg_local_ssignal_init();
msg_local_send_pulse(type, code);
return 0;
}
\ No newline at end of file
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <poll.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include "../lib/sock_msg.h"
int main()
{
uint16_t type = 2;
u_int32_t code = 2;
msg_local_rsignal_init();
printf("%hd %d\n", type, code);
msg_local_recv_pulse(&type, &code);
printf("%hd %d\n", type, code);
return 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment