Changeset a68f737 in mainline for uspace/lib/libc/generic/task.c


Ignore:
Timestamp:
2009-06-08T12:34:38Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d9c8c81
Parents:
f8ef660
Message:

keep a list of open files to support proper cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/task.c

    rf8ef660 ra68f737  
    106106        fdi_node_t stderr_node;
    107107       
    108         if ((stdin != NULL) && (stdin != &stdin_null)) {
    109                 fnode(stdin, &stdin_node);
     108        if ((stdin != NULL) && (fnode(stdin, &stdin_node) == EOK))
    110109                files[0] = &stdin_node;
    111         } else
     110        else
    112111                files[0] = NULL;
    113112       
    114         if ((stdout != NULL) && (stdout != &stdout_klog)) {
    115                 fnode(stdout, &stdout_node);
     113        if ((stdout != NULL) && (fnode(stdout, &stdout_node) == EOK))
    116114                files[1] = &stdout_node;
    117         } else
     115        else
    118116                files[1] = NULL;
    119117       
    120         if ((stderr != NULL) && (stderr != &stdout_klog)) {
    121                 fnode(stderr, &stderr_node);
     118        if ((stderr != NULL) && (fnode(stderr, &stderr_node) == EOK))
    122119                files[2] = &stderr_node;
    123         } else
     120        else
    124121                files[2] = NULL;
    125122       
Note: See TracChangeset for help on using the changeset viewer.