Working with the Process.spawn function

I want to spawn a process from another function that outputs a specific text.