<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style="--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: hsla(0,0%,100%,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style="font-size: inherit; -webkit-text-shadow: hsla(0,0%,100%,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";">
<div class="content">
<p style="color: #777777;">
<a href="https://gitlab.rtems.org/mohamedayman23">Mohamed Ayman</a>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1355#note_154770">commented</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<h1 dir="auto" style="margin-top: 0px; margin-bottom: 1rem; font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.25; color: #18171d;" align="initial">
<gl-emoji title="scroll" data-name="scroll" data-unicode-version="6.0" style="margin-top: 0px;">๐</gl-emoji> <strong style="font-weight: 600;">The History of Parameter 'forever' is ignored with login function Issue</strong> <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/1828" title="Parameter 'forever' is ignored with login function" class="gfm gfm-issue" data-original="#1828" data-link="false" data-link-reference="false" data-issue="23220" data-project="26" data-iid="1828" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#1828</a> <gl-emoji title="scroll" data-name="scroll" data-unicode-version="6.0">๐</gl-emoji>
</h1>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0px; padding: 0;">
<li style="margin-top: 0px; line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><strong style="font-weight: 600; margin-top: 0px;">July 2011:The Issue created by Trac Migrate</strong></li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">
<strong style="font-weight: 600; margin-top: 0px;">April 2014 (The First Attempt):</strong> Dr. Gedare <a href="https://gitlab.rtems.org/gedare" title="Gedare Bloom" class="gfm gfm-project_member js-user-link" data-user="8" data-original="@gedare" data-container="body" data-placement="top" data-reference-type="user" style="color: #284779; background-color: #cbe2f9; border-radius: .25rem; padding: 0 2px;">@gedare</a> first proposed fixing this by changing the loop condition from <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">while (result && shell_env->forever);</code> to <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">while (result || shell_env->forever);</code>.
<ul style="list-style-type: circle; margin: 0px; padding: 0;">
<li style="margin-top: 0px; line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/1828" title="Parameter 'forever' is ignored with login function" class="gfm gfm-work_item" data-original="Issue link" data-link="true" data-original-href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/1828" data-link-reference="true" data-work-item="23220" data-project="26" data-iid="1828" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-work-item-type="issue" data-container="body" data-placement="top" data-reference-type="work_item" style="margin-top: 0px;">Issue link</a></li>
</ul>
</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">
<strong style="font-weight: 600; margin-top: 0px;">January 2025 (MR</strong> <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/371" title="Namespace conflict between pppd and ncurses" class="gfm gfm-issue" data-original="#371" data-link="false" data-link-reference="false" data-issue="26183" data-project="26" data-iid="371" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#371 (closed)</a> <strong style="font-weight: 600;">- Closed):</strong> Kinsey Moore <a href="https://gitlab.rtems.org/opticron" title="Kinsey Moore" class="gfm gfm-project_member js-user-link" data-user="4" data-original="@opticron" data-container="body" data-placement="top" data-reference-type="user" style="color: #284779; background-color: #cbe2f9; border-radius: .25rem; padding: 0 2px;">@opticron</a> revisited Dr. Gedare's original idea and opened MR <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/371" title="Namespace conflict between pppd and ncurses" class="gfm gfm-issue" data-original="#371" data-link="false" data-link-reference="false" data-issue="26183" data-project="26" data-iid="371" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#371 (closed)</a> using the same <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">||</code> operator change. However, the MR was closed because the community realized that this approach was dangerous; and required much more testing before it could be merged.
<ul style="list-style-type: circle; margin: 0px; padding: 0;">
<li style="margin-top: 0px; line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/371" title="Draft: cpukit/shell: Honor the forever flag" class="gfm gfm-merge_request" data-original="MR#371 link" data-link="true" data-original-href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/371" data-link-reference="true" data-merge-request="896" data-project="26" data-project-path="rtems/rtos/rtems" data-iid="371" data-container="body" data-placement="top" data-reference-type="merge_request" style="margin-top: 0px;">MR#371 link</a></li>
</ul>
</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">
<strong style="font-weight: 600; margin-top: 0px;">July 2025 (MR</strong> <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/619" title="account for latency when updating decrementer/system clock" class="gfm gfm-issue" data-original="#619" data-link="false" data-link-reference="false" data-issue="27739" data-project="26" data-iid="619" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#619 (closed)</a> <strong style="font-weight: 600;">- Merged):</strong> Chris Johns <a href="https://gitlab.rtems.org/chris" title="Chris Johns" class="gfm gfm-project_member js-user-link" data-user="3" data-original="@chris" data-container="body" data-placement="top" data-reference-type="user" style="color: #284779; background-color: #cbe2f9; border-radius: .25rem; padding: 0 2px;">@chris</a> provided a deep dive into why simply altering the boolean condition breaks the shell. He proved that Termios will block and stay blocked in the reader with the shell's current termios settings. He noted that without fundamentally rewriting the shell reader, developers have to rely on workarounds (like his <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">wake_console()</code> function that alters the telnet pty <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">c_cc[VMIN]</code> and <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">VTIME</code> settings) to handle dropped websocket/telnet sessions. He concluded that the simple <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">||</code> change fundamentally breaks shell functionality.
<ul style="list-style-type: circle; margin: 0px; padding: 0;">
<li style="margin-top: 0px; line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/619" title="libcsupport/termios: Wake receiver when ICANON settings change" class="gfm gfm-merge_request" data-original="MR#619 link" data-link="true" data-original-href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/619" data-link-reference="true" data-merge-request="1466" data-project="26" data-project-path="rtems/rtos/rtems" data-iid="619" data-container="body" data-placement="top" data-reference-type="merge_request" style="margin-top: 0px;">MR#619 link</a></li>
</ul>
</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">
<strong style="font-weight: 600; margin-top: 0px;">July 2026 (MR <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/1355" title="SD card code rejects MMC and random blocks written sequentially" class="gfm gfm-issue" data-original="#1355" data-link="false" data-link-reference="false" data-issue="23650" data-project="26" data-iid="1355" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue" style="margin-top: 0px;">#1355 (closed)</a> - The Current Fix):</strong> Mohamed Ayman <a href="https://gitlab.rtems.org/mohamedayman23" title="Mohamed Ayman" class="gfm gfm-project_member js-user-link" data-user="2123" data-original="@mohamedayman23" data-container="body" data-placement="top" data-reference-type="user" style="color: #284779; background-color: #cbe2f9; border-radius: .25rem; padding: 0 2px;">@mohamedayman23</a> opened MR <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/1355" title="SD card code rejects MMC and random blocks written sequentially" class="gfm gfm-issue" data-original="#1355" data-link="false" data-link-reference="false" data-issue="23650" data-project="26" data-iid="1355" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#1355 (closed)</a> with a targeted logic fix. Instead of hacking the boolean operators and accidentally breaking EOF handling or Termios blocking, we tracked the specific failure state directly. By introducing a new <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">login_failed</code> variable, the loop now knows <em>why</em> <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">result</code> is false. The updated condition, <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">while (shell_env->forever && (result || login_failed))</code>, isolates the failed login edge-case. This allows the shell to correctly prompt for a new login when <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">forever</code> is true, while cleanly preserving the shell's behavior for actual EOFs, explicit <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">exit</code> commands, and environment setup failures.
<ul style="list-style-type: circle; margin: 0px; padding: 0;">
<li style="margin-top: 0px; line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1355" title="Fix_Issue_1828: Respect forever flag on failed login" class="gfm gfm-merge_request" data-original="MR#1355 link" data-link="true" data-original-href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1355" data-link-reference="true" data-merge-request="2798" data-project="26" data-project-path="rtems/rtos/rtems" data-iid="1355" data-container="body" data-placement="top" data-reference-type="merge_request" style="margin-top: 0px;">MR#1355 link</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
โ
<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1355#note_154770">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/4-b4craqw75g3epa4w7542y3tuo-1d/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread ยท <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> ยท <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1355#note_154770 at 1784290703
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1355#note_154770"}}</script>
</p>
</div>
</body>
</html>