1 /***************************************************************************
2 * Copyright 1995, Technion, Israel Institute of Technology
3 * Electrical Eng, Software Lab.
4 * Author: Michael Veksler.
5 ***************************************************************************
7 * Purpose : test DDE signals and processes functionality for DDE
8 * Usage: run two independant processes, one with an argument another
9 * without (with the argument is the server).
10 ***************************************************************************
12 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
13 #include <sys/syscall.h>
14 #include <sys/param.h>
26 #include "shm_main_blk.h"
28 #if !defined(BSD4_4) || defined(linux) || defined(__FreeBSD__)
32 extern void ___sig_restore();
33 extern void ___masksig_restore();
35 /* Similar to the sigaction function in libc, except it leaves alone the
39 wine_sigaction(int sig,struct sigaction * new, struct sigaction * old)
41 __asm__("int $0x80":"=a" (sig)
42 :"0" (SYS_sigaction),"b" (sig),"c" (new),"d" (old));
50 struct sigaction usr2_act;
56 usr2_act.sa_handler = (__sighandler_t) stop_wait;
57 usr2_act.sa_flags = 0;
58 usr2_act.sa_restorer =
59 (void (*)()) (((unsigned int)(cstack) + sizeof(cstack) - 4) & ~3);
60 wine_sigaction(SIGUSR2,&usr2_act,NULL);
62 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
63 usr2_act.sa_hadnler = (void (*)) stop_wait;
64 usr2_act.sa_flags = SA_ONSTACK;
65 usr2_act.sa_mask = sig_mask;
66 usr2_act.sa_restorer =
67 (void (*)()) (((unsigned int)(cstack) + sizeof(cstack) - 4) & ~3);
68 if (sigaction(SIGUSR2,&usr2_act,NULL) <0) {
69 perror("sigaction: SIGUSR2");
74 void ATOM_GlobalInit()
76 printf("ATOM_GlobalInit\n");
83 for(timeout=500; timeout ; timeout--) {
84 if (DDE_GetRemoteMessage())
95 msg.message= WM_DDE_INITIATE;
98 if (!DDE_SendMessage(&msg))
108 int main(int argc, char *argv[])
110 printf("Kill when done one message\n");