| 1234567891011121314151617181920212223 |
- #!/bin/bash
- # Test with strace to see what's happening with file descriptors
- echo "Testing with strace..."
- strace -e trace=write,read,ioctl -f -o strace.log ./builddir/examples/minimal-server &
- SERVER_PID=$!
- # Give it a moment to start
- sleep 0.5
- # Send initialize request
- echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "test-client", "version": "1.0.0"}}}' | nc -N localhost 0 2>/dev/null || echo "nc failed, trying direct pipe"
- # Wait a bit
- sleep 1
- # Kill the server
- kill $SERVER_PID 2>/dev/null
- # Show the strace log
- echo "=== Strace log ==="
- cat strace.log
|