Hey there! I'm experimenting with POSIX api and I want to create my own mini shell. I want my shell to open an interactive shell mode and be able to receive command input line by line from the kernel. I am not sure how to achieve this. If I am not mistaken, I read that I should be able to somehow link my shell to a /dev/ttyX or /dev/pts/X driver in "cooked mode" (my shell only receives input only after a user presses 'ENTER', not after every keypress)
Ive tried Googling for the solution, but its been ineffective. Im so confused, I don't even know how to look for a solution for this.
Here is the current code snippet of my program. (Excuse the bad programming) `initInteractiveMode` is meant to initialize interactive mode
Life will test you. There will be seasons of loss, betrayal, uncertainty, illness, conflict, and disappointment. In those moments, most people become consumed by fear, frustration, blame, and the endless search for who is right and who is wrong. The problem is that none of those things move you forward. They only drain your energy and create more interference between where you are and where you want to be.
When life feels overwhelming, your greatest power is not control. It is influence. The influence you have over your next thought, your next breath, and your next action.
When your mind is racing and emotions are running high, pause. Take a conscious breath. Create space between the event and your response. In that space, ask yourself a simple question:
“What is the highest version of me choosing in this moment?”
That question can change everything.
Your circumstances may be difficult, but your character is still your choice. Your fear may be loud, but your intention can be louder. Your pain may be real, but it does not have to become your identity.
I have learned that no matter what is happening around us, we always have access to two powerful choices. We can be fully present, and we can choose to lead with compassion, gratitude, empathy, forgiveness, and responsibility.
The moment you stop fighting what you cannot control and focus on the energy you are choosing to bring into the situation, your compass resets. You begin moving from reaction to response. From fear to faith. From conflict to clarity.
Your greatest power has never been controlling life. It has always been choosing who you will be while living it.
If this message spoke to you or something within it resonated, I invite you to check out my other ideas in my books sold on Amazon. They have already helped thousands worldwide.
Bad things do not pick certain people. They happen to all of us. Trauma, loss, and lack are part of being human. The difference is never the event. It is the energy you bring to it.
I do not look at people as good or bad. That is judgment and it shifts depending on perspective. I look at energy. Anabolic energy builds, grows, and nurtures. Catabolic energy drains, restricts, and holds you back.
Every moment gives you a choice in how you show up. You can respond with responsibility, compassion, presence, and purpose. Or you can react with anger, resistance, apathy, and low energy. Both are available. Both are human. But only one moves your life forward.
Most people live in reaction. They let the moment dictate their thoughts, emotions, and actions. That is where power is lost. When you become aware, you interrupt that pattern. You shift from reacting to responding. That is influence. That is where change begins.
Your life is not defined by what happens to you. It is defined by how you think, how you feel, and how you act after it happens. That is the pattern that creates your results.
You still have a choice in every moment. You still have the power to direct your energy. Start using it with intention and you will start building a life that reflects your true potential.
If this message spoke to you or something within it resonated, I invite you to check out my other ideas in my books sold on Amazon. They have already helped thousands worldwide.