fix leak redir
This commit is contained in:
parent
33f6c24b0e
commit
28b2a059a5
11 changed files with 29 additions and 19 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */
|
/* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/19 17:13:05 by wescande ### ########.fr */
|
/* Updated: 2017/03/20 11:51:45 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -63,9 +63,8 @@ struct s_rvwords
|
||||||
int type;
|
int type;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern t_rvwords g_rvwords[];
|
/* extern t_rvwords g_rvwords[]; */
|
||||||
|
/* extern int (*g_lexer[])(t_list **alst, t_lexer *lexer); */
|
||||||
extern int (*g_lexer[])(t_list **alst, t_lexer *lexer);
|
|
||||||
|
|
||||||
int ft_post_tokenize(t_list **alst, char **str);
|
int ft_post_tokenize(t_list **alst, char **str);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,6 @@ struct s_treematch
|
||||||
int (*add)(t_btree **ast, t_list **lst);
|
int (*add)(t_btree **ast, t_list **lst);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern t_treematch g_treematch[];
|
|
||||||
|
|
||||||
int build_tree(t_btree **ast, t_list **lst);
|
int build_tree(t_btree **ast, t_list **lst);
|
||||||
|
|
||||||
int add_sep(t_btree **ast, t_list **lst);
|
int add_sep(t_btree **ast, t_list **lst);
|
||||||
|
|
@ -153,7 +151,8 @@ struct s_distrostree
|
||||||
int (*add)(t_btree **ast, t_list **lst);
|
int (*add)(t_btree **ast, t_list **lst);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern t_distrostree g_distrostree[];
|
/* extern t_distrostree g_distrostree[]; */
|
||||||
|
/* extern t_treematch g_treematch[]; */
|
||||||
|
|
||||||
struct s_redir
|
struct s_redir
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/03 14:57:21 by jhalford #+# #+# */
|
/* Created: 2016/11/03 14:57:21 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/08 12:03:14 by jhalford ### ########.fr */
|
/* Updated: 2017/03/20 12:25:42 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -18,7 +18,9 @@ t_list *ft_lstmap(t_list *lst, void *(*f)(void *))
|
||||||
|
|
||||||
if (!lst)
|
if (!lst)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
elem = ft_lstnew((*f)(lst->content), lst->content_size);
|
if (!(elem = (t_list *)malloc(sizeof(*elem))))
|
||||||
|
return (NULL);
|
||||||
|
elem->content = (*f)(lst->content);
|
||||||
elem->next = ft_lstmap(lst->next, f);
|
elem->next = ft_lstmap(lst->next, f);
|
||||||
return (elem);
|
return (elem);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/29 15:57:38 by jhalford #+# #+# */
|
/* Created: 2016/11/29 15:57:38 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/13 15:41:27 by jhalford ### ########.fr */
|
/* Updated: 2017/03/20 12:23:44 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,15 @@
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* ::: :::::::: */
|
||||||
|
/* id.c :+: :+: :+: */
|
||||||
|
/* +:+ +:+ +:+ */
|
||||||
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
|
/* +#+#+#+#+#+ +#+ */
|
||||||
|
/* Created: 2017/03/20 12:20:59 by jhalford #+# #+# */
|
||||||
|
/* Updated: 2017/03/20 12:21:01 by jhalford ### ########.fr */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "libft.h"
|
#include "libft.h"
|
||||||
|
|
||||||
void *id(void *data)
|
void *id(void *data)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/05 14:54:45 by jhalford #+# #+# */
|
/* Created: 2017/03/05 14:54:45 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/20 11:38:35 by jhalford ### ########.fr */
|
/* Updated: 2017/03/20 12:22:50 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/08 00:02:58 by ariard #+# #+# */
|
/* Created: 2017/03/08 00:02:58 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/13 14:20:56 by jhalford ### ########.fr */
|
/* Updated: 2017/03/20 12:21:26 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/03 18:12:57 by ariard #+# #+# */
|
/* Created: 2017/03/03 18:12:57 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/20 11:39:40 by jhalford ### ########.fr */
|
/* Updated: 2017/03/20 12:21:21 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/01/08 14:30:07 by jhalford #+# #+# */
|
/* Created: 2017/01/08 14:30:07 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/20 11:00:49 by jhalford ### ########.fr */
|
/* Updated: 2017/03/20 12:12:16 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -37,7 +37,6 @@ int builtin_fg(const char *path, char *const av[], char *const envp[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DG("rank:%i:%i", rank[0], rank[1]);
|
|
||||||
if ((jlist = ft_lst_find(jobc->first_job, &rank[0], job_cmp_id)))
|
if ((jlist = ft_lst_find(jobc->first_job, &rank[0], job_cmp_id)))
|
||||||
job_run(jlist->content, 1);
|
job_run(jlist->content, 1);
|
||||||
else if ((jlist = ft_lst_find(jobc->first_job, &rank[1], job_cmp_id)))
|
else if ((jlist = ft_lst_find(jobc->first_job, &rank[1], job_cmp_id)))
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/15 13:01:19 by jhalford #+# #+# */
|
/* Created: 2016/12/15 13:01:19 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/18 00:07:12 by wescande ### ########.fr */
|
/* Updated: 2017/03/20 12:15:50 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -27,8 +27,7 @@ int do_job_notification(void)
|
||||||
{
|
{
|
||||||
j = jlist->content;
|
j = jlist->content;
|
||||||
jlist = jlist->next;
|
jlist = jlist->next;
|
||||||
if (job_is_completed(j->id)
|
if ((job_is_stopped(j->id) && !(j->attrs & JOB_NOTIFIED)))
|
||||||
|| (job_is_stopped(j->id) && !(j->attrs & JOB_NOTIFIED)))
|
|
||||||
{
|
{
|
||||||
ret = 1;
|
ret = 1;
|
||||||
job_notify_change(j->id);
|
job_notify_change(j->id);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/15 12:56:11 by jhalford #+# #+# */
|
/* Created: 2016/12/15 12:56:11 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/16 18:32:15 by jhalford ### ########.fr */
|
/* Updated: 2017/03/20 12:12:45 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue