changepwd.c

来自「多用户银行系统」· C语言 代码 · 共 27 行

C
27
字号
#include "../include/structs.h"#include "../include/stddef.h"#include <signal.h>#include <stdio.h>	#include <unistd.h>void _changepwd (SHM * shm){	union sigval sig;	struct sigaction act;		sig.sival_int = getpid();	printf("please input your id:");	scanf("%d",&(shm->inta));	printf("please input your oldpassword:");	scanf("%s",&(shm->chara));	printf("please input your newpassword:");	scanf("%s",&(shm->charb));	printf("please input your newpassword again:");	scanf("%s",&(shm->charc));	sigqueue(shm->spid, SIGRQST , sig);	        printf("input over!send to server!\n");      	pause();	sigaction(shm->cid,SIGRQST,sig);	printf("%s\n",shm->chard);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?