2023年12月28日发(作者:)
{ perror("close_std()"); exit(1); } //player music if((pid = fork()) < 0) { perror("fork()"); exit(1); } else if(pid == 0) { if(execlp(player, player, music_file, (char *)0) < 0) { perror("execlp()"); exit(1); } exit(0); } //send notify information to user if((pid = fork()) < 0) { perror("fork()"); } else if(pid == 0) { notify_init("Mail"); NotifyNotification * notify = notify_notification_new("Mail", notify_body, "Mail"); notify_notification_show(notify, NULL); exit(0); } exit(0);}
Makefile:SRC_INCLUDE=-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0CC=gccMOD_CFLAGS=-fPICCFLAGS=-g -O2 -DHAVE_CONFIG_H -DNSCORELDFLAGS=LIBS=-lnotify
DBG_FLAGS= -DDEBUG=1OUT_PROGRAM= newmail_notifyall: mainmain: $(CC) $(MOD_CFLAGS) $(CFLAGS) $(SRC_INCLUDE) -o $(OUT_PROGRAM) newmail_notify.c $(MOD_LDFLAGS) $(LDFLAGS) $(LIBS)


发布评论