aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-08 14:09:23 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-08 14:09:23 +0200
commitddd1ee44436c2ec7e0125ca128c9a148bea8a2c0 (patch)
tree0f2e44e3cff4ac426b4be113c4bcb0cfe3acbebf /libbb/appletlib.c
parent8858a9864e1d56cfc121755d613d1292727d15f3 (diff)
downloadbusybox-w32-ddd1ee44436c2ec7e0125ca128c9a148bea8a2c0.tar.gz
busybox-w32-ddd1ee44436c2ec7e0125ca128c9a148bea8a2c0.tar.bz2
busybox-w32-ddd1ee44436c2ec7e0125ca128c9a148bea8a2c0.zip
libbb: simplify NOFORK/NOEXEC defines, move set_task_comm to libbb
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r--libbb/appletlib.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 5b84920a4..cbca7ef17 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -34,14 +34,6 @@
34# include <malloc.h> /* for mallopt */ 34# include <malloc.h> /* for mallopt */
35#endif 35#endif
36 36
37#include <sys/prctl.h>
38#ifndef PR_SET_NAME
39#define PR_SET_NAME 15
40#endif
41#ifndef PR_GET_NAME
42#define PR_GET_NAME 16
43#endif
44
45/* Declare <applet>_main() */ 37/* Declare <applet>_main() */
46#define PROTOTYPES 38#define PROTOTYPES
47#include "applets.h" 39#include "applets.h"
@@ -911,14 +903,6 @@ int busybox_main(int argc UNUSED_PARAM, char **argv)
911} 903}
912# endif 904# endif
913 905
914#if defined(__linux__) && (NUM_APPLETS > 1)
915void FAST_FUNC set_task_comm(const char *comm)
916{
917 /* okay if too long (truncates) */
918 prctl(PR_SET_NAME, (long)comm, 0, 0, 0);
919}
920#endif
921
922# if NUM_APPLETS > 0 906# if NUM_APPLETS > 0
923void FAST_FUNC run_applet_no_and_exit(int applet_no, const char *name, char **argv) 907void FAST_FUNC run_applet_no_and_exit(int applet_no, const char *name, char **argv)
924{ 908{