summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/system.c')
-rw-r--r--lib/libc/stdlib/system.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c
index e018e6f..bd9ea5a 100644
--- a/lib/libc/stdlib/system.c
+++ b/lib/libc/stdlib/system.c
@@ -46,8 +46,17 @@ __FBSDID("$FreeBSD$");
#include "un-namespace.h"
#include "libc_private.h"
+#pragma weak system
int
-__system(const char *command)
+system(const char *command)
+{
+
+ return (((int (*)(const char *))
+ __libc_interposing[INTERPOS_system])(command));
+}
+
+int
+__libc_system(const char *command)
{
pid_t pid, savedpid;
int pstat;
@@ -95,5 +104,5 @@ __system(const char *command)
return(pid == -1 ? -1 : pstat);
}
-__weak_reference(__system, system);
-__weak_reference(__system, _system);
+__weak_reference(__libc_system, __system);
+__weak_reference(__libc_system, _system);
OpenPOWER on IntegriCloud