use -base directory as the cwd for the process
This commit is contained in:
parent
bced67d4f5
commit
d19d4b96ab
|
@ -854,6 +854,7 @@ SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t *queue, void
|
|||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm,
|
||||
switch_memory_pool_t *pool);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_filepath_set(const char *path, switch_memory_pool_t *pool);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t *thefile, switch_seek_where_t where, int64_t *offset);
|
||||
|
||||
|
|
|
@ -875,6 +875,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
apr_pool_create(&pool, NULL);
|
||||
|
||||
switch_filepath_set(SWITCH_GLOBAL_dirs.base_dir, pool);
|
||||
|
||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.run_dir, SWITCH_DEFAULT_DIR_PERMS, pool);
|
||||
|
||||
if (switch_file_open(&fd, pid_path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE, pool) == SWITCH_STATUS_SUCCESS) {
|
||||
|
|
|
@ -403,6 +403,11 @@ SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const ch
|
|||
return apr_file_open(newf, fname, flag, perm, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_filepath_set(const char *path, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_filepath_set(path, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t *thefile, switch_seek_where_t where, int64_t *offset)
|
||||
{
|
||||
apr_status_t rv;
|
||||
|
|
Loading…
Reference in New Issue