Skip to content

Improve mailsync wrapper script environment variable handling#105

Merged
bengotow merged 1 commit intomasterfrom
claude/add-exec-build-script-oHhPS
Apr 8, 2026
Merged

Improve mailsync wrapper script environment variable handling#105
bengotow merged 1 commit intomasterfrom
claude/add-exec-build-script-oHhPS

Conversation

@bengotow
Copy link
Copy Markdown
Collaborator

@bengotow bengotow commented Apr 8, 2026

Summary

Updated the mailsync wrapper script generation in the Linux build process to properly export environment variables and use exec for cleaner process management.

Key Changes

  • Changed SASL_PATH and LD_LIBRARY_PATH assignments to use export statements, ensuring they are properly propagated to the mailsync.bin process
  • Replaced inline variable assignment with explicit export declarations for better clarity and reliability
  • Added exec before the mailsync.bin invocation to replace the shell process, improving process hierarchy and signal handling

Implementation Details

These changes ensure that:

  1. Environment variables are properly exported rather than just set in the current shell context
  2. The mailsync.bin process runs as a direct child of the calling process (via exec), which is important for proper signal handling and process management
  3. The wrapper script is more maintainable with explicit export statements on separate lines

https://claude.ai/code/session_01TEFo1y7kgfu5D4vfRWhakY

Replace the child-process invocation of mailsync.bin with exec so bash
replaces itself with the binary. This ensures SIGTERM is delivered
directly to mailsync.bin rather than to the wrapper shell, providing
defense-in-depth for clean process termination. Also export SASL_PATH
and LD_LIBRARY_PATH explicitly for clarity.

https://claude.ai/code/session_01TEFo1y7kgfu5D4vfRWhakY
@bengotow bengotow merged commit 358b145 into master Apr 8, 2026
8 checks passed
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.

2 participants