In either case, the shell redirects I/O appropriately, and sends the SIGCONT signal to the process, which causes the operating system to resume its execution.
Regardless of the context, the shell manages I/O appropriately and sends the SIGCONT signal to the process, allowing the operating system to resume its execution.