- Timestamp:
- Sep 17, 2020, 11:32:45 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shinstance.c
r3472 r3476 43 43 #include "alias.h" 44 44 #include "error.h" 45 #include "input.h" 46 #include "jobs.h" 45 47 #include "memalloc.h" 46 48 #include "nodes.h" … … 121 123 } g_sig_state[NSIG]; 122 124 125 /********************************************************************************************************************************* 126 * Internal Functions * 127 *********************************************************************************************************************************/ 128 #ifndef SH_FORKED_MODE 129 static void shsubshellstatus_signal_and_release(shinstance *psh, int iExit); 130 #endif 131 123 132 124 133 … … 308 317 sh_free(psh, psh->threadarg); 309 318 psh->threadarg = NULL; 319 assert(!psh->subshellstatus); 320 if (psh->subshellstatus) 321 { 322 shsubshellstatus_signal_and_release(psh, psh->exitstatus); 323 psh->subshellstatus = NULL; 324 } 310 325 #endif 311 326 … … 384 399 } 385 400 386 #if 0 387 /* input.h */ 388 int plinno/* = 1 */;/**< input line number */ 389 int parsenleft; /**< number of characters left in input buffer */ 390 char *parsenextc; /**< next character in input buffer */ 391 int init_editline/* = 0 */; /**< 0 == not setup, 1 == OK, -1 == failed */ 392 393 /* input.c */ 394 int parselleft; /**< copy of parsefile->lleft */ 395 struct parsefile basepf; /**< top level input file */ 396 char basebuf[BUFSIZ];/**< buffer for top level input file */ 397 struct parsefile *parsefile/* = &basepf*/; /**< current input file */ 398 #ifndef SMALL 399 EditLine *el; /**< cookie for editline package */ 400 #endif 401 402 /* jobs.h */ 403 shpid backgndpid/* = -1 */; /**< pid of last background process */ 404 int job_warning; /**< user was warned about stopped jobs */ 405 406 /* jobs.c */ 407 struct job *jobtab; /**< array of jobs */ 408 int njobs; /**< size of array */ 409 int jobs_invalid; /**< set in child */ 410 shpid initialpgrp; /**< pgrp of shell on invocation */ 411 int curjob/* = -1*/;/**< current job */ 412 int ttyfd/* = -1*/; 413 int jobctl; /**< job control enabled / disabled */ 414 char *cmdnextc; 415 int cmdnleft; 416 417 418 /* mail.c */ 419 #define MAXMBOXES 10 420 int nmboxes; /**< number of mailboxes */ 421 time_t mailtime[MAXMBOXES]; /**< times of mailboxes */ 401 /* input.h/c */ 402 popallfiles(psh); 403 while (psh->basepf.strpush) 404 popstring(psh); 405 406 /* jobs.h/c */ 407 if (psh->jobtab) 408 { 409 int j = psh->njobs; 410 while (j-- > 0) 411 if (psh->jobtab[j].used && psh->jobtab[j].ps != &psh->jobtab[j].ps0) 412 { 413 sh_free(psh, psh->jobtab[j].ps); 414 psh->jobtab[j].ps = &psh->jobtab[j].ps0; 415 } 416 sh_free(psh, psh->jobtab); 417 psh->jobtab = NULL; 418 psh->njobs = 0; 419 } 422 420 423 421 /* myhistedit.h */ 424 422 #ifndef SMALL 423 # error FIXME 425 424 History *hist; 426 425 EditLine *el; 427 #endif428 426 #endif 429 427 … … 456 454 psh->argptr = NULL; 457 455 psh->minusc = NULL; 458 459 #if 0460 /* parse.h */461 int tokpushback;462 int whichprompt; /**< 1 == PS1, 2 == PS2 */463 464 /* parser.c */465 int noalias/* = 0*/;/**< when set, don't handle aliases */466 struct heredoc *heredoclist; /**< list of here documents to read */467 int parsebackquote; /**< nonzero if we are inside backquotes */468 int doprompt; /**< if set, prompt the user */469 int needprompt; /**< true if interactive and at start of line */470 int lasttoken; /**< last token read */471 char *wordtext; /**< text of last word returned by readtoken */472 int checkkwd; /**< 1 == check for kwds, 2 == also eat newlines */473 struct nodelist *backquotelist;474 union node *redirnode;475 struct heredoc *heredoc;476 int quoteflag; /**< set if (part of) last token was quoted */477 int startlinno; /**< line # where last token started */478 #endif479 456 480 457 /* redir.c */
Note:
See TracChangeset
for help on using the changeset viewer.