tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / bin / quit.cpp
blobb3541ec2d3cc94db5852698aae583fa36a2e39a2
1 /*
2 * quit.cpp
3 * (c) 2002, Carlos Hasan, for OpenBeOS.
4 */
6 #include <stdio.h>
7 #include <string.h>
8 #include <app/Messenger.h>
10 int main(int argc, char *argv[])
12 status_t status;
14 if (argc != 2) {
15 printf("use: %s mime_sig\n", argv[0]);
16 return 1;
19 BMessenger messenger(argv[1]);
21 if (!messenger.IsValid()) {
22 printf("could not find running app with sig %s\n", argv[1]);
23 return 1;
26 if ((status = messenger.SendMessage(B_QUIT_REQUESTED)) != B_OK) {
27 printf("could not send message, %s\n", strerror(status));
28 return 1;
31 return 0;