Skip to content

Fix socket lua shell print output going to local console and not to socket output - #383

Merged
pktgen merged 2 commits into
pktgen:mainfrom
lukav-hr:fix/socket-shell-print-redirect-stdout
Aug 31, 2026
Merged

Fix socket lua shell print output going to local console and not to socket output#383
pktgen merged 2 commits into
pktgen:mainfrom
lukav-hr:fix/socket-shell-print-redirect-stdout

Conversation

@lukav-hr

Copy link
Copy Markdown
Contributor

The socket shell output from lua uses the print global function to write the stack values after each execution in the doREPL loop. By default the function is hardcoded in lua to print to stdout, writing all the values to the local console and not to the user connecting over the socket.
This fix replaces the global print function with one that writes to the redirected stdfiles that wrap the socket output.

lukav-hr and others added 2 commits August 31, 2026 11:49
Signed-off-by: Luka Vretenar <luka.vretenar@gmail.com>
Remove {} around one line control statments.

@pktgen pktgen left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this one has been on the back burner for a while :-(

@pktgen
pktgen merged commit c0f11bb into pktgen:main Aug 31, 2026
1 of 2 checks passed
@lukav-hr

lukav-hr commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@pktgen glad to have it fixed. Appreciate the quick response and all the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants