diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-03-16 06:37:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-03-16 06:37:12 +0000 |
commit | a94679135080615136be4d83a66b3f964b8d66a4 (patch) | |
tree | b2963b59c8b2377f5c551039abf985092167dc17 /io.c | |
parent | 62fda90d7adf5436d15f9407bed294bd5a4885be (diff) |
1.1b9_03 pre2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -886,7 +886,7 @@ rb_fdopen(fd, mode) return f; } -#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__) || 1 +#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__) static struct pipe_list { OpenFile *fptr; struct pipe_list *next; @@ -913,6 +913,7 @@ pipe_del_fptr(fptr) if (list->fptr == fptr) { pipe_list = list->next; + free(list); return; } @@ -931,10 +932,12 @@ static void pipe_atexit() { struct pipe_list *list = pipe_list; + struct pipe_list *tmp; while (list) { + tmp = list->next; io_fptr_finalize(list->fptr); - list = list->next; + list = tmp; } } @@ -2500,7 +2503,7 @@ Init_IO() rb_define_virtual_variable("$-i", opt_i_get, opt_i_set); -#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__) || 1 +#if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__) atexit(pipe_atexit); #endif |