aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-28 15:11:46 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-29 16:14:51 -0800
commit909d24cde6acf87587370355d7a9cbc7dc18435c (patch)
treee859cfa7d3d39998affe6ce42bb44d47977a804b /proc.cpp
parent4e912ef83df234d34fff4156cd2bfb165e113674 (diff)
More work on improving interaction between fork and pthreads. Added null_terminated_array_t class.
Diffstat (limited to 'proc.cpp')
-rw-r--r--proc.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/proc.cpp b/proc.cpp
index 837aae19..7546883d 100644
--- a/proc.cpp
+++ b/proc.cpp
@@ -177,31 +177,6 @@ void job_free( job_t * j )
delete j;
}
-void process_t::free_argv(void) {
- if (argv_array != NULL) {
- for (size_t i = 0; argv_array[i] != NULL; i++) {
- delete [] argv_array[i];
- }
- delete [] argv_array;
- }
- argv_array = NULL;
-}
-
-void process_t::set_argv(const wcstring_list_t &argv) {
- /* Get rid of the old argv */
- free_argv();
-
- /* Allocate our null-terminated array of null-terminated strings */
- size_t i, count = argv.size();
- argv_array = new wchar_t* [count + 1];
- for (i=0; i < count; i++) {
- const wcstring &str = argv.at(i);
- argv_array[i] = new wchar_t [1 + str.size()];
- wcscpy(argv_array[i], str.c_str());
- }
- argv_array[i] = NULL;
-}
-
void proc_destroy()
{
event.arguments.reset(NULL);