-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminishell_eval_romain
More file actions
2794 lines (2785 loc) · 120 KB
/
minishell_eval_romain
File metadata and controls
2794 lines (2785 loc) · 120 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
c3r3s3% git clone git@vogsphere.42luxembourg.lu:vogsphere/intra-uuid-35777429-606c-44b2-b3e0-a42db954291d-6142227-mvoloshy
Cloning into 'intra-uuid-35777429-606c-44b2-b3e0-a42db954291d-6142227-mvoloshy'...
remote: Enumerating objects: 105, done.
remote: Counting objects: 100% (105/105), done.
remote: Compressing objects: 100% (105/105), done.
remote: Total 105 (delta 65), reused 0 (delta 0)
Receiving objects: 100% (105/105), 141.74 KiB | 4.72 MiB/s, done.
Resolving deltas: 100% (65/65), done.
c3r3s3% ls
docker intra-uuid-35777429-606c-44b2-b3e0-a42db954291d-6142227-mvoloshy
eval_aai
c3r3s3% mv intra-uuid-35777429-606c-44b2-b3e0-a42db954291d-6142227-mvoloshy minishell_romain
c3r3s3% cd minishell_romain
c3r3s3% ls
includes libft Makefile sources
c3r3s3% norminette
sources/executor.c: OK!
sources/environment_utils2.c: OK!
sources/lexer.c: OK!
sources/error_handler.c: OK!
sources/signals.c: OK!
sources/lexer_quotes.c: OK!
sources/parser.c: OK!
sources/environment_utils.c: OK!
sources/executor_pipe.c: OK!
sources/parser_path.c: OK!
sources/lexer_args.c: OK!
sources/environment.c: OK!
sources/lexer_helper.c: OK!
sources/main.c: OK!
Notice: GLOBAL_VAR_DETECTED (line: 15, col: 1): Global variable present in file. Make sure it is a reasonable choice.
sources/parser_redirection.c: OK!
sources/executor_utils.c: OK!
sources/lexer_utils.c: OK!
sources/builtins/echo.c: OK!
sources/builtins/env.c: OK!
sources/builtins/cd.c: OK!
sources/builtins/export.c: OK!
sources/builtins/unset.c: OK!
sources/builtins/exit.c: OK!
sources/builtins/pwd.c: OK!
includes/parser.h: OK!
includes/color.h: OK!
includes/lexer.h: OK!
includes/libft.h: OK!
includes/minishell.h: OK!
Notice: GLOBAL_VAR_DETECTED (line: 40, col: 1): Global variable present in file. Make sure it is a reasonable choice.
libft/ft_strncmp.c: OK!
libft/ft_memchr.c: OK!
libft/ft_strmapi.c: OK!
libft/ft_putchar_fd.c: OK!
libft/ft_strndup.c: OK!
libft/ft_isalnum.c: OK!
libft/ft_isdigit.c: OK!
libft/ft_lstadd_front.c: OK!
libft/ft_strncpy.c: OK!
libft/ft_bzero.c: OK!
libft/ft_strlcpy.c: OK!
libft/ft_strrchr.c: OK!
libft/ft_strlcat.c: OK!
libft/ft_lstsize.c: OK!
libft/ft_strjoin.c: OK!
libft/ft_memcmp.c: OK!
libft/ft_isprint.c: OK!
libft/ft_memset.c: OK!
libft/ft_lstclear.c: OK!
libft/ft_tolower.c: OK!
libft/ft_isascii.c: OK!
libft/ft_putstr_fd.c: OK!
libft/ft_lstadd_back.c: OK!
libft/ft_lstiter.c: OK!
libft/ft_strchr.c: OK!
libft/ft_lstdelone.c: OK!
libft/ft_split.c: OK!
libft/ft_strcmp.c: OK!
libft/ft_lstmap.c: OK!
libft/ft_strpbrk.c: OK!
libft/ft_putnbr_fd.c: OK!
libft/ft_calloc.c: OK!
libft/ft_str_ends_with.c: OK!
libft/ft_strrev.c: OK!
libft/ft_strdup.c: OK!
libft/ft_substr.c: OK!
libft/ft_striteri.c: OK!
libft/ft_strcount.c: OK!
libft/ft_isalpha.c: OK!
libft/ft_memmove.c: OK!
libft/ft_putendl_fd.c: OK!
libft/ft_atoi.c: OK!
libft/ft_memcpy.c: OK!
libft/ft_strtrim.c: OK!
libft/ft_strlen.c: OK!
libft/ft_lstlast.c: OK!
libft/ft_strcpy.c: OK!
libft/ft_lstnew.c: OK!
libft/libft.h: OK!
libft/ft_itoa.c: OK!
libft/ft_str_starts_with.c: OK!
libft/ft_toupper.c: OK!
libft/ft_strnstr.c: OK!
libft/ft_str_rm_front_chars.c: OK!
c3r3s3% ls
includes libft Makefile sources
c3r3s3% make
cc -g -Werror -Wextra -Wall -c -o sources/main.o sources/main.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer.o sources/lexer.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_utils.o sources/lexer_utils.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_helper.o sources/lexer_helper.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_args.o sources/lexer_args.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_quotes.o sources/lexer_quotes.c
cc -g -Werror -Wextra -Wall -c -o sources/parser.o sources/parser.c
cc -g -Werror -Wextra -Wall -c -o sources/parser_redirection.o sources/parser_redirection.c
cc -g -Werror -Wextra -Wall -c -o sources/parser_path.o sources/parser_path.c
cc -g -Werror -Wextra -Wall -c -o sources/executor.o sources/executor.c
cc -g -Werror -Wextra -Wall -c -o sources/executor_pipe.o sources/executor_pipe.c
cc -g -Werror -Wextra -Wall -c -o sources/executor_utils.o sources/executor_utils.c
cc -g -Werror -Wextra -Wall -c -o sources/error_handler.o sources/error_handler.c
cc -g -Werror -Wextra -Wall -c -o sources/signals.o sources/signals.c
cc -g -Werror -Wextra -Wall -c -o sources/environment.o sources/environment.c
cc -g -Werror -Wextra -Wall -c -o sources/environment_utils.o sources/environment_utils.c
cc -g -Werror -Wextra -Wall -c -o sources/environment_utils2.o sources/environment_utils2.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/cd.o sources/builtins/cd.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/pwd.o sources/builtins/pwd.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/export.o sources/builtins/export.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/echo.o sources/builtins/echo.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/unset.o sources/builtins/unset.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/env.o sources/builtins/env.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/exit.o sources/builtins/exit.c
make -C ./libft
make[1]: Entering directory '/goinfre/mvoloshy/minishell_romain/libft'
make[1]: Leaving directory '/goinfre/mvoloshy/minishell_romain/libft'
cc -g -Werror -Wextra -Wall sources/main.o sources/lexer.o sources/lexer_utils.o sources/lexer_helper.o sources/lexer_args.o sources/lexer_quotes.o sources/parser.o sources/parser_redirection.o sources/parser_path.o sources/executor.o sources/executor_pipe.o sources/executor_utils.o sources/error_handler.o sources/signals.o sources/environment.o sources/environment_utils.o sources/environment_utils2.o sources/builtins/cd.o sources/builtins/pwd.o sources/builtins/export.o sources/builtins/echo.o sources/builtins/unset.o sources/builtins/env.o sources/builtins/exit.o -o minishell -L./libft -lft -lreadline
c3r3s3% ls
includes libft Makefile minishell sources
c3r3s3% cd libft
c3r3s3% ls
ft_atoi.c ft_isdigit.o ft_lstiter.c ft_memcmp.o ft_putstr_fd.c ft_strdup.o ft_strmapi.c ft_strrchr.o ft_toupper.c
ft_atoi.o ft_isprint.c ft_lstiter.o ft_memcpy.c ft_putstr_fd.o ft_str_ends_with.c ft_strmapi.o ft_strrev.c ft_toupper.o
ft_bzero.c ft_isprint.o ft_lstlast.c ft_memcpy.o ft_split.c ft_str_ends_with.o ft_strncmp.c ft_strrev.o libft.a
ft_bzero.o ft_itoa.c ft_lstlast.o ft_memmove.c ft_split.o ft_striteri.c ft_strncmp.o ft_str_rm_front_chars.c libft.h
ft_calloc.c ft_itoa.o ft_lstmap.c ft_memmove.o ft_strchr.c ft_striteri.o ft_strncpy.c ft_str_rm_front_chars.o Makefile
ft_calloc.o ft_lstadd_back.c ft_lstmap.o ft_memset.c ft_strchr.o ft_strjoin.c ft_strncpy.o ft_str_starts_with.c minishell
ft_isalnum.c ft_lstadd_back.o ft_lstnew.c ft_memset.o ft_strcmp.c ft_strjoin.o ft_strndup.c ft_str_starts_with.o README.md
ft_isalnum.o ft_lstadd_front.c ft_lstnew.o ft_putchar_fd.c ft_strcmp.o ft_strlcat.c ft_strndup.o ft_strtrim.c
ft_isalpha.c ft_lstadd_front.o ft_lstsize.c ft_putchar_fd.o ft_strcount.c ft_strlcat.o ft_strnstr.c ft_strtrim.o
ft_isalpha.o ft_lstclear.c ft_lstsize.o ft_putendl_fd.c ft_strcount.o ft_strlcpy.c ft_strnstr.o ft_substr.c
ft_isascii.c ft_lstclear.o ft_memchr.c ft_putendl_fd.o ft_strcpy.c ft_strlcpy.o ft_strpbrk.c ft_substr.o
ft_isascii.o ft_lstdelone.c ft_memchr.o ft_putnbr_fd.c ft_strcpy.o ft_strlen.c ft_strpbrk.o ft_tolower.c
ft_isdigit.c ft_lstdelone.o ft_memcmp.c ft_putnbr_fd.o ft_strdup.c ft_strlen.o ft_strrchr.c ft_tolower.o
c3r3s3% make fclean
c3r3s3% make
c3r3s3% make fclean
c3r3s3% cd ..
c3r3s3% make
make: Nothing to be done for 'all'.
c3r3s3% make fclean
make -C ./libft clean
make[1]: Entering directory '/goinfre/mvoloshy/minishell_romain/libft'
make[1]: Leaving directory '/goinfre/mvoloshy/minishell_romain/libft'
rm -f sources/main.o sources/lexer.o sources/lexer_utils.o sources/lexer_helper.o sources/lexer_args.o sources/lexer_quotes.o sources/parser.o sources/parser_redirection.o sources/parser_path.o sources/executor.o sources/executor_pipe.o sources/executor_utils.o sources/error_handler.o sources/signals.o sources/environment.o sources/environment_utils.o sources/environment_utils2.o sources/builtins/cd.o sources/builtins/pwd.o sources/builtins/export.o sources/builtins/echo.o sources/builtins/unset.o sources/builtins/env.o sources/builtins/exit.o sources/main.o sources/lexer.o sources/lexer_utils.o sources/lexer_helper.o sources/lexer_args.o sources/lexer_quotes.o sources/parser.o sources/parser_redirection.o sources/parser_path.o sources/executor.o sources/executor_pipe.o sources/executor_utils.o sources/error_handler.o sources/signals.o sources/environment.o sources/environment_utils.o sources/environment_utils2.o sources/builtins/cd.o sources/builtins/pwd.o sources/builtins/export.o sources/builtins/echo.o sources/builtins/unset.o sources/builtins/env.o sources/builtins/exit.o
rm -f minishell;
rm -f minishell_bonus;
make -C ./libft fclean
make[1]: Entering directory '/goinfre/mvoloshy/minishell_romain/libft'
make[1]: Leaving directory '/goinfre/mvoloshy/minishell_romain/libft'
c3r3s3% make
cc -g -Werror -Wextra -Wall -c -o sources/main.o sources/main.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer.o sources/lexer.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_utils.o sources/lexer_utils.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_helper.o sources/lexer_helper.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_args.o sources/lexer_args.c
cc -g -Werror -Wextra -Wall -c -o sources/lexer_quotes.o sources/lexer_quotes.c
cc -g -Werror -Wextra -Wall -c -o sources/parser.o sources/parser.c
cc -g -Werror -Wextra -Wall -c -o sources/parser_redirection.o sources/parser_redirection.c
cc -g -Werror -Wextra -Wall -c -o sources/parser_path.o sources/parser_path.c
cc -g -Werror -Wextra -Wall -c -o sources/executor.o sources/executor.c
cc -g -Werror -Wextra -Wall -c -o sources/executor_pipe.o sources/executor_pipe.c
cc -g -Werror -Wextra -Wall -c -o sources/executor_utils.o sources/executor_utils.c
cc -g -Werror -Wextra -Wall -c -o sources/error_handler.o sources/error_handler.c
cc -g -Werror -Wextra -Wall -c -o sources/signals.o sources/signals.c
cc -g -Werror -Wextra -Wall -c -o sources/environment.o sources/environment.c
cc -g -Werror -Wextra -Wall -c -o sources/environment_utils.o sources/environment_utils.c
cc -g -Werror -Wextra -Wall -c -o sources/environment_utils2.o sources/environment_utils2.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/cd.o sources/builtins/cd.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/pwd.o sources/builtins/pwd.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/export.o sources/builtins/export.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/echo.o sources/builtins/echo.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/unset.o sources/builtins/unset.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/env.o sources/builtins/env.c
cc -g -Werror -Wextra -Wall -c -o sources/builtins/exit.o sources/builtins/exit.c
make -C ./libft
make[1]: Entering directory '/goinfre/mvoloshy/minishell_romain/libft'
make[1]: Leaving directory '/goinfre/mvoloshy/minishell_romain/libft'
cc -g -Werror -Wextra -Wall sources/main.o sources/lexer.o sources/lexer_utils.o sources/lexer_helper.o sources/lexer_args.o sources/lexer_quotes.o sources/parser.o sources/parser_redirection.o sources/parser_path.o sources/executor.o sources/executor_pipe.o sources/executor_utils.o sources/error_handler.o sources/signals.o sources/environment.o sources/environment_utils.o sources/environment_utils2.o sources/builtins/cd.o sources/builtins/pwd.o sources/builtins/export.o sources/builtins/echo.o sources/builtins/unset.o sources/builtins/env.o sources/builtins/exit.o -o minishell -L./libft -lft -lreadline
c3r3s3% make
make: Nothing to be done for 'all'.
c3r3s3% ls
includes libft Makefile minishell sources
c3r3s3% ./minishell
minishell>
minishell>
minishell>
minishell>
minishell>
exit
c3r3s3% ./minishell
minishell>^C
minishell>^C
minishell>^C
minishell>dddd^C
minishell>
minishell>echo^C
minishell>cc
clang: error: no input files
minishell>cc
clang: error: no input files
minishell>exit
c3r3s3% valgrind ./minishell
==431236== Memcheck, a memory error detector
==431236== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==431236== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==431236== Command: ./minishell
==431236==
minishell>
exit
==431236==
==431236== HEAP SUMMARY:
==431236== in use at exit: 204,207 bytes in 221 blocks
==431236== total heap usage: 520 allocs, 299 frees, 227,580 bytes allocated
==431236==
==431236== LEAK SUMMARY:
==431236== definitely lost: 0 bytes in 0 blocks
==431236== indirectly lost: 0 bytes in 0 blocks
==431236== possibly lost: 0 bytes in 0 blocks
==431236== still reachable: 204,207 bytes in 221 blocks
==431236== suppressed: 0 bytes in 0 blocks
==431236== Rerun with --leak-check=full to see details of leaked memory
==431236==
==431236== For lists of detected and suppressed errors, rerun with: -s
==431236== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
c3r3s3% valgrind --track-fds=yes ./minishell
==431253== Memcheck, a memory error detector
==431253== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==431253== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==431253== Command: ./minishell
==431253==
minishell>
exit
==431253==
==431253== FILE DESCRIPTORS: 5 open (3 std) at exit.
==431253== Open file descriptor 4: /dev/pts/0
==431253== at 0x49D9FEB: dup (syscall-template.S:120)
==431253== by 0x4013A1: reset_vars (main.c:31)
==431253== by 0x4014A9: init_shell_vars (main.c:49)
==431253== by 0x401705: main (main.c:112)
==431253==
==431253== Open file descriptor 3: /dev/pts/0
==431253== at 0x49D9FEB: dup (syscall-template.S:120)
==431253== by 0x40138E: reset_vars (main.c:30)
==431253== by 0x4014A9: init_shell_vars (main.c:49)
==431253== by 0x401705: main (main.c:112)
==431253==
==431253==
==431253== HEAP SUMMARY:
==431253== in use at exit: 204,207 bytes in 221 blocks
==431253== total heap usage: 520 allocs, 299 frees, 227,580 bytes allocated
==431253==
==431253== LEAK SUMMARY:
==431253== definitely lost: 0 bytes in 0 blocks
==431253== indirectly lost: 0 bytes in 0 blocks
==431253== possibly lost: 0 bytes in 0 blocks
==431253== still reachable: 204,207 bytes in 221 blocks
==431253== suppressed: 0 bytes in 0 blocks
==431253== Rerun with --leak-check=full to see details of leaked memory
==431253==
==431253== For lists of detected and suppressed errors, rerun with: -s
==431253== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
c3r3s3% valgrind --track-fds=yes ./minishell
==431289== Memcheck, a memory error detector
==431289== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==431289== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==431289== Command: ./minishell
==431289==
minishell>exit
==431289==
==431289== FILE DESCRIPTORS: 5 open (3 std) at exit.
==431289== Open file descriptor 4: /dev/pts/0
==431289== at 0x49D9FEB: dup (syscall-template.S:120)
==431289== by 0x4013A1: reset_vars (main.c:31)
==431289== by 0x4014A9: init_shell_vars (main.c:49)
==431289== by 0x401705: main (main.c:112)
==431289==
==431289== Open file descriptor 3: /dev/pts/0
==431289== at 0x49D9FEB: dup (syscall-template.S:120)
==431289== by 0x40138E: reset_vars (main.c:30)
==431289== by 0x4014A9: init_shell_vars (main.c:49)
==431289== by 0x401705: main (main.c:112)
==431289==
==431289==
==431289== HEAP SUMMARY:
==431289== in use at exit: 208,228 bytes in 223 blocks
==431289== total heap usage: 533 allocs, 310 frees, 231,809 bytes allocated
==431289==
==431289== LEAK SUMMARY:
==431289== definitely lost: 0 bytes in 0 blocks
==431289== indirectly lost: 0 bytes in 0 blocks
==431289== possibly lost: 0 bytes in 0 blocks
==431289== still reachable: 208,228 bytes in 223 blocks
==431289== suppressed: 0 bytes in 0 blocks
==431289== Rerun with --leak-check=full to see details of leaked memory
==431289==
==431289== For lists of detected and suppressed errors, rerun with: -s
==431289== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
c3r3s3% ulimit -n
1024
c3r3s3% valgrind --track-fds=yes ./minishell
==431353== Memcheck, a memory error detector
==431353== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==431353== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==431353== Command: ./minishell
==431353==
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>grep -r "g_sig_pid"
grep: minishell: binary file matches
grep: sources/executor.o: binary file matches
grep: sources/minishell: binary file matches
sources/executor.c: g_sig_pid = fork();
sources/executor.c: if (g_sig_pid == -1)
sources/executor.c: else if (g_sig_pid == 0)
grep: sources/signals.o: binary file matches
grep: sources/executor_pipe.o: binary file matches
sources/signals.c: if (g_sig_pid == 0 || g_sig_pid == 131 || g_sig_pid == 130)
sources/signals.c: if (g_sig_pid == -255)
sources/signals.c: g_sig_pid = 130;
sources/signals.c: g_sig_pid = 131;
grep: sources/lexer_args.o: binary file matches
sources/executor_pipe.c: g_sig_pid = fork();
sources/executor_pipe.c: if (g_sig_pid == -1)
sources/executor_pipe.c: if (g_sig_pid == 0)
sources/lexer_args.c: tmp_2 = ft_itoa(g_sig_pid);
sources/main.c:int g_sig_pid;
sources/main.c: g_sig_pid = m->ex_status;
sources/parser_redirection.c: g_sig_pid = -255;
sources/parser_redirection.c: while (g_sig_pid == -255)
sources/parser_redirection.c: if (g_sig_pid == 130
sources/parser_redirection.c: if (g_sig_pid != -255)
sources/parser_redirection.c: return (0 - g_sig_pid);
grep: sources/main.o: binary file matches
grep: sources/parser_redirection.o: binary file matches
includes/minishell.h:extern int g_sig_pid;
grep: libft/minishell: binary file matches
minishell>valgrind ./minishell
==431789== Memcheck, a memory error detector
==431789== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==431789== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==431789== Command: ./minishell
==431789==
==431789== Invalid read of size 1
==431789== at 0x40665A: ft_strdup (ft_strdup.c:32)
==431789== by 0x40145F: init_shell_vars (main.c:44)
==431789== by 0x401705: main (main.c:112)
==431789== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==431789==
==431789==
==431789== Process terminating with default action of signal 11 (SIGSEGV)
==431789== Access not within mapped region at address 0x0
==431789== at 0x40665A: ft_strdup (ft_strdup.c:32)
==431789== by 0x40145F: init_shell_vars (main.c:44)
==431789== by 0x401705: main (main.c:112)
==431789== If you believe this happened as a result of a stack
==431789== overflow in your program's main thread (unlikely but
==431789== possible), you can try to increase the size of the
==431789== main thread stack using the --main-stacksize= flag.
==431789== The main thread stack size used in this run was 8388608.
==431789==
==431789== HEAP SUMMARY:
==431789== in use at exit: 348 bytes in 9 blocks
==431789== total heap usage: 15 allocs, 6 frees, 420 bytes allocated
==431789==
==431789== LEAK SUMMARY:
==431789== definitely lost: 0 bytes in 0 blocks
==431789== indirectly lost: 0 bytes in 0 blocks
==431789== possibly lost: 0 bytes in 0 blocks
==431789== still reachable: 348 bytes in 9 blocks
==431789== suppressed: 0 bytes in 0 blocks
==431789== Rerun with --leak-check=full to see details of leaked memory
==431789==
==431789== For lists of detected and suppressed errors, rerun with: -s
==431789== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
minishell>ls
Makefile includes libft minishell sources
minishell>exit
==431353==
==431353== FILE DESCRIPTORS: 13 open (3 std) at exit.
==431353== Open file descriptor 12: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x4013A1: reset_vars (main.c:31)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 11: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x40138E: reset_vars (main.c:30)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 10: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x4013A1: reset_vars (main.c:31)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 9: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x40138E: reset_vars (main.c:30)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 8: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x4013A1: reset_vars (main.c:31)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 7: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x40138E: reset_vars (main.c:30)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 6: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x4013A1: reset_vars (main.c:31)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 5: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x40138E: reset_vars (main.c:30)
==431353== by 0x401691: prompt_loop (main.c:96)
==431353== by 0x40170E: main (main.c:113)
==431353==
==431353== Open file descriptor 4: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x4013A1: reset_vars (main.c:31)
==431353== by 0x4014A9: init_shell_vars (main.c:49)
==431353== by 0x401705: main (main.c:112)
==431353==
==431353== Open file descriptor 3: /dev/pts/0
==431353== at 0x49D9FEB: dup (syscall-template.S:120)
==431353== by 0x40138E: reset_vars (main.c:30)
==431353== by 0x4014A9: init_shell_vars (main.c:49)
==431353== by 0x401705: main (main.c:112)
==431353==
==431353==
==431353== HEAP SUMMARY:
==431353== in use at exit: 208,228 bytes in 223 blocks
==431353== total heap usage: 824 allocs, 601 frees, 958,677 bytes allocated
==431353==
==431353== LEAK SUMMARY:
==431353== definitely lost: 0 bytes in 0 blocks
==431353== indirectly lost: 0 bytes in 0 blocks
==431353== possibly lost: 0 bytes in 0 blocks
==431353== still reachable: 208,228 bytes in 223 blocks
==431353== suppressed: 0 bytes in 0 blocks
==431353== Rerun with --leak-check=full to see details of leaked memory
==431353==
==431353== For lists of detected and suppressed errors, rerun with: -s
==431353== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
c3r3s3% valgrind --track-fds=yes ./minishell
==431795== Memcheck, a memory error detector
==431795== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==431795== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==431795== Command: ./minishell
==431795==
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>/bin/ls
Makefile includes libft minishell sources
minishell>exit
==431795==
==431795== FILE DESCRIPTORS: 75 open (3 std) at exit.
==431795== Open file descriptor 74: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 73: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 72: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 71: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 70: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 69: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 68: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 67: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 66: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 65: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 64: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 63: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 62: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 61: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 60: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 59: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 58: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 57: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 56: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 55: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 54: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 53: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 52: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 51: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 50: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 49: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 48: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 47: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 46: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 45: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 44: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 43: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 42: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 41: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 40: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 39: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 38: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 37: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 36: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 35: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 34: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 33: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 32: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 31: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 30: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 29: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 28: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 27: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 26: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 25: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 24: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 23: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 22: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 21: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 20: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 19: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 18: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 17: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 16: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 15: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 14: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 13: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 12: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 11: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 10: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 9: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 8: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 7: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 6: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 5: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x401691: prompt_loop (main.c:96)
==431795== by 0x40170E: main (main.c:113)
==431795==
==431795== Open file descriptor 4: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x4013A1: reset_vars (main.c:31)
==431795== by 0x4014A9: init_shell_vars (main.c:49)
==431795== by 0x401705: main (main.c:112)
==431795==
==431795== Open file descriptor 3: /dev/pts/0
==431795== at 0x49D9FEB: dup (syscall-template.S:120)
==431795== by 0x40138E: reset_vars (main.c:30)
==431795== by 0x4014A9: init_shell_vars (main.c:49)
==431795== by 0x401705: main (main.c:112)
==431795==
==431795==
==431795== HEAP SUMMARY:
==431795== in use at exit: 208,228 bytes in 223 blocks
==431795== total heap usage: 2,772 allocs, 2,549 frees, 10,603,121 bytes allocated
==431795==
==431795== LEAK SUMMARY:
==431795== definitely lost: 0 bytes in 0 blocks
==431795== indirectly lost: 0 bytes in 0 blocks
==431795== possibly lost: 0 bytes in 0 blocks
==431795== still reachable: 208,228 bytes in 223 blocks
==431795== suppressed: 0 bytes in 0 blocks
==431795== Rerun with --leak-check=full to see details of leaked memory
==431795==
==431795== For lists of detected and suppressed errors, rerun with: -s
==431795== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
c3r3s3% valgrind --track-fds=yes ./minishell
==431832== Memcheck, a memory error detector
==431832== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==431832== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info