[haiku-commits] r41743 - haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 25 May 2011 18:04:29 +0200 (CEST)

Author: bonefish
Date: 2011-05-25 18:04:28 +0200 (Wed, 25 May 2011)
New Revision: 41743
Changeset: https://dev.haiku-os.org/changeset/41743

Modified:
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/raise.c
Log:
raise() must set errno instead of returning the error code directly.


Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/raise.c
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/raise.c
   2011-05-25 16:03:25 UTC (rev 41742)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/raise.c
   2011-05-25 16:04:28 UTC (rev 41743)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2002-2006, Haiku Project. All rights reserved.
+ *  Copyright (c) 2002-2011, Haiku Project. All rights reserved.
  *  Distributed under the terms of the Haiku license.
  *
  *  Author(s):
@@ -7,13 +7,18 @@
  */
 
 
-#include <OS.h>
 #include <signal.h>
 
+#include <errno.h>
 
+#include <OS.h>
+
+#include <syscall_utils.h>
+
+
 int
 raise(int sig)
 {
-       return send_signal(find_thread(NULL), sig);
+       RETURN_AND_SET_ERRNO(send_signal(find_thread(NULL), sig));
 }
 


Other related posts:

  • » [haiku-commits] r41743 - haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal - ingo_weinhold