Your questions are related to the fundamentals of forks. What are forks? Where are they used? Are they essential? These questions have been answered (yes from a C perspective), but that does not change the answers.
No, beginners aren't allowed to use forks. They are a level 2 restricted system call (L2SYS). Talk to your manager about getting certified.
On a more technical note, yes I suppose you could do that, but there is no unfork() as far as I know, so if you want to do something like that and the two need to interact in a meaningful way, you either need to learn how to use shared memory, or how to use threads.
Forks are very unnecessary for most things not concerned with networking. Your post above is quite redundant, since I would assume you would fork if you wanted to try run prog1 & prog1 concurrently (obviously this isn't entirely true, but will appear that way). If you are willing to wait for prog2 to finish before proceeding with prog1, why use a fork?
**how to solve invalid keystore error in android studio here is error report----------------------->
here is error report--------> error:Error:java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key palash from store "D:\MyApplication3.idea\workspace.xml": Invalid keystore format ...