Skip to contentSkip to conversation

Sending signals to a process in Windows

Openvpn-devel Mathias Sundman 2 participants 2 messages Aug 14, 2004

lore
Share & tools
lore
#0 lore raw

I'd like my Windows OpenVPN GUI to be able to send signals to the openvpn processes.

Is it possible to send signals (like SIGHUP, SIGUSR1) to processses in Windows? How?

If not, how do I pass a scancode (like a function key) to a Pipe? I've used WriteFile() to pass the passphrase string, but that can only contain ASCII chars, right?

Signature · 4 lines
_____________________________________________________________
Mathias Sundman                  (^)   ASCII Ribbon Campaign
NILINGS AB                        X    NO HTML/RTF in e-mail
Tel: +46-(0)8-666 32 28          / \   NO Word docs in e-mail
#1 lore raw
Quoted 5 lines · Mathias Sundman

I'd like my Windows OpenVPN GUI to be able to send signals to the openvpn processes.

Is it possible to send signals (like SIGHUP, SIGUSR1) to processses in Windows? How?

Windows doesn't really have signals like *nix.

When I want something signal-like I usually use a named Windows event object (see CreateEvent).

Then if you have an event loop which you want to be signalable, just add the handle returned by CreateEvent to the list of handles you are waiting for.

Quoted 3 lines

If not, how do I pass a scancode (like a function key) to a Pipe? I've used WriteFile() to pass the passphrase string, but that can only contain ASCII chars, right?

Not sure about scancodes <-> pipes. As far as getting scancodes, see the win32_keyboard_get function in win32.c.

James