* Changed the _kern_exec() and _kern_load_image() syscalls. They expect
a flattened argument/environment buffer now. This simplifies the work for the kernel a bit, since it can just copy the buffer and check whether it looks OK instead of messing around with individual strings. The runtime loader also gets a flattened array. * Set the maximum size of the arguments/environment buffer to 128 KB. When more arguments are passed, we fail with a proper error code (instead of just truncating the arguments as before). * On exec*() the first argument was silently replaced by the given path name, which is not correct. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26119 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -51,16 +51,16 @@ struct user_thread* team_allocate_user_thread(struct team* team);
|
||||
void team_free_user_thread(struct thread* thread);
|
||||
|
||||
// used in syscalls.c
|
||||
thread_id _user_load_image(int32 argCount, const char **args, int32 envCount,
|
||||
const char **env, int32 priority, uint32 flags,
|
||||
thread_id _user_load_image(const char* const* flatArgs, size_t flatArgsSize,
|
||||
int32 argCount, int32 envCount, int32 priority, uint32 flags,
|
||||
port_id errorPort, uint32 errorToken);
|
||||
status_t _user_wait_for_team(team_id id, status_t *_returnCode);
|
||||
void _user_exit_team(status_t returnValue);
|
||||
status_t _user_kill_team(thread_id thread);
|
||||
thread_id _user_wait_for_child(thread_id child, uint32 flags, int32 *_reason,
|
||||
status_t *_returnCode);
|
||||
status_t _user_exec(const char *path, int32 argc, char * const *argv,
|
||||
int32 envCount, char * const *environment);
|
||||
status_t _user_exec(const char *path, const char* const* flatArgs,
|
||||
size_t flatArgsSize, int32 argCount, int32 envCount);
|
||||
thread_id _user_fork(void);
|
||||
team_id _user_get_current_team(void);
|
||||
pid_t _user_process_info(pid_t process, int32 which);
|
||||
|
||||
Reference in New Issue
Block a user