Changeset 592 for trunk/src/sh_sig.c
- Timestamp:
- Oct 31, 2026, 7:16:07 PM (3 days ago)
- File:
-
- 1 edited
-
trunk/src/sh_sig.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_sig.c
r579 r592 645 645 int flag_sig = S_FALSE; 646 646 SL_TICKET fdTmp = (-1); 647 SL_TICKET open_tmp (void); 647 SL_TICKET open_tmp (void); 648 int close_tmp ( SL_TICKET); 648 649 649 650 /* extract the data and copy to temporary file … … 660 661 661 662 fin_cp = fdopen(dup(get_the_fd(fd)), "rb"); 663 if (!fin_cp) { close_tmp(fdTmp); return -1; } 662 664 buf = SH_ALLOC(fgets_buf_size); 663 665 664 666 while (NULL != fgets(buf, fgets_buf_size, fin_cp)) 665 667 { … … 720 722 fin_cp = fdopen(dup(get_the_fd(fdTmp)), "rb"); 721 723 FILE * fout = fopen("xxx.out", "w+"); 724 if (!fout) { close_tmp(fdTmp); return -1; } 725 if (!fin_cp) { close_tmp(fdTmp); fclose(fout); return -1; } 722 726 while (NULL != fgets(buf, fgets_buf_size, fin_cp)) 723 727 { … … 1598 1602 int flag_nohead = S_FALSE; 1599 1603 SL_TICKET fdTmp = (-1); 1600 SL_TICKET open_tmp (void); 1601 1604 SL_TICKET open_tmp (void); 1605 int close_tmp ( SL_TICKET); 1606 1602 1607 /* extract the data and copy to temporary file 1603 1608 */ … … 1613 1618 1614 1619 fin_cp = fdopen(dup(get_the_fd(fd)), "rb"); 1620 if (!fin_cp) { close_tmp(fdTmp); return -1; } 1615 1621 buf = SH_ALLOC(fgets_buf_size); 1616 1622 1617 1623 while (NULL != fgets(buf, fgets_buf_size, fin_cp)) 1618 1624 {
Note:
See TracChangeset
for help on using the changeset viewer.