My overarching program is a shell script. This shell script calls a C program that I need to pipe input to, and ultimately the C program will create a shell.

However, when I pipe my input into the C program within the shell script

```
Do_Other_Stuff
./my_prog < file1

```

I can't get the shell to stay alive. Running just,

```
Do_Other_Stuff
./my_prog

```

works, as I have to input the stdin myself, and the shell correctly spawns when my\_prog exits. I'm pretty sure wrapping up the ./my\_prog call in a C program, and compiling and running that would work, but I'm curious as to whether there's a cleaner way with shell.

I've tried several combinations of using `cat file1 | ./my_prog` and using `&` in different situations, and haven't had any success.

Thanks!