merge stash
This commit is contained in:
parent
8f70df9264
commit
8b414aac13
14 changed files with 26 additions and 28 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 15:04:28 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:49:13 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/15 13:01:19 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 17:04:27 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 17:05:31 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/13 15:10:20 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 12:30:33 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:41:15 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -25,10 +25,10 @@ int job_is_completed(int id)
|
|||
while (lst)
|
||||
{
|
||||
p = lst->content;
|
||||
/* DG("checking pid=%i", p->pid); */
|
||||
DG("checking pid=%i", p->pid);
|
||||
if (!(p->attributes & PROCESS_COMPLETED))
|
||||
{
|
||||
/* DG("process %i is not completed", p->pid); */
|
||||
DG("process %i is not completed", p->pid);
|
||||
return (0);
|
||||
}
|
||||
lst = lst->next;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/13 14:58:36 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 16:56:52 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 17:06:23 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ int put_job_in_foreground(t_job *job, int cont)
|
|||
perror("kill (SIGCONT)");
|
||||
}
|
||||
/* Wait for it to report. */
|
||||
/* DG("gonna wait for job id=%i", job->id); */
|
||||
DG("gonna wait for job id=%i", job->id);
|
||||
job_wait(job->id);
|
||||
job_remove(job->id);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/10 15:14:53 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 10:30:27 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:49:33 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -14,6 +14,10 @@
|
|||
|
||||
void sigtstp_handler(int signo)
|
||||
{
|
||||
t_jobc *jobc;
|
||||
|
||||
(void)signo;
|
||||
DG("got SIGTSTP");
|
||||
jobc = &data_singleton()->jobc;
|
||||
DG("got SIGTSTP in process %i", getpid());
|
||||
kill(jobc->shell_pgid, SIGCONT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/11/10 13:37:11 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 15:15:27 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:37:30 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -38,7 +38,6 @@ int ft_tokenize(t_list **alst, char *str, t_lexstate state)
|
|||
{
|
||||
t_token *token;
|
||||
|
||||
DG("state=%i, *str=%c", state, *str);
|
||||
if (!*str)
|
||||
return (0);
|
||||
if (!*alst)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/01/10 14:54:57 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 15:19:44 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:36:15 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -20,7 +20,6 @@ int lexer_var(t_list **alst, char *str)
|
|||
token = (*alst)->content;
|
||||
token->type = TK_N_WORD;
|
||||
str++;
|
||||
DG("check, *str=%c, data='%s'", *str, token->data);
|
||||
if (!ft_strchr(token->data, '$'))
|
||||
token_append(token, '$');
|
||||
if (!*str)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2017/01/10 14:57:53 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 15:19:47 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:37:33 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,12 @@
|
|||
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/09 01:45:09 by sbenning #+# #+# */
|
||||
/* Updated: 2017/01/10 11:43:12 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:41:28 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_readline.h"
|
||||
#include "job_control.h"
|
||||
|
||||
void rl_set_prompt(t_line *line)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: sbenning <sbenning@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/08 18:07:47 by sbenning #+# #+# */
|
||||
/* Updated: 2017/01/10 17:02:48 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 17:06:13 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
int rl_setup(t_line *line)
|
||||
{
|
||||
rl_set_termios(1);
|
||||
do_job_notification();
|
||||
ft_bzero(line, sizeof(t_line));
|
||||
if (curs_setup(&line->curs) < 0)
|
||||
return (-1);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/11/28 19:26:32 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 13:16:23 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:49:28 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 14:20:28 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:50:35 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,22 +6,16 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/12 17:37:04 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 13:13:51 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 16:51:45 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "minishell.h"
|
||||
|
||||
extern char **environ;
|
||||
extern char PC;
|
||||
extern char *UP;
|
||||
extern char *BC;
|
||||
|
||||
void shell_exit(void)
|
||||
{
|
||||
/* DG("cleanup. char * UP at %p", UP); */
|
||||
/* DG("cleanup. char * BC at %p", BC); */
|
||||
DG("shell_exit()");
|
||||
data_exit();
|
||||
job_kill_all();
|
||||
tcsetattr(0, TCSANOW, &data_singleton()->jobc.shell_tmodes);
|
||||
tcsetattr(STDIN, TCSANOW, &data_singleton()->jobc.shell_tmodes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */
|
||||
/* Updated: 2017/01/10 17:00:46 by jhalford ### ########.fr */
|
||||
/* Updated: 2017/01/10 17:05:44 by jhalford ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue