diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-11-27 18:50:47 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-11-27 18:50:47 +0100 |
| commit | 06851f8b984574cd1532191feca9765ea07904c0 (patch) | |
| tree | f389096a5bab95f8d4b7cd2be3595d7fac0cd45f /src/wrapped/wrappedlibc.c | |
| parent | 893fc7c9402dac4bd8c1dd2cbdd42752c59012bd (diff) | |
| download | box64-06851f8b984574cd1532191feca9765ea07904c0.tar.gz box64-06851f8b984574cd1532191feca9765ea07904c0.zip | |
Added box64rc configuration file handling
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index d1d686b1..6d7169bb 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -38,6 +38,7 @@ #include <syslog.h> #include <malloc.h> #include <getopt.h> +#include <sys/prctl.h> #undef LOG_INFO #undef LOG_DEBUG @@ -60,6 +61,7 @@ #include "elfloader.h" #include "bridge.h" #include "globalsymbols.h" +#include "rcfile.h" #define LIBNAME libc const char* libcName = "libc.so.6"; @@ -2969,6 +2971,15 @@ EXPORT void my_exit(x64emu_t* emu, int code) EXPORT void my__exit(x64emu_t* emu, int code) __attribute__((alias("my_exit"))); +EXPORT int my_prctl(x64emu_t* emu, int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) +{ + if(option==PR_SET_NAME) { + printf_log(LOG_DEBUG, "BOX64: set process name to \"%s\"\n", (char*)arg2); + ApplyParams((char*)arg2); + } + return prctl(option, arg2, arg3, arg4, arg5); +} + EXPORT char* my___progname = NULL; EXPORT char* my___progname_full = NULL; |