首页 \ 问答 \ gdb:中断运行进程而不杀死子进程(gdb: interrupt running process without killing child processes)

gdb:中断运行进程而不杀死子进程(gdb: interrupt running process without killing child processes)

我有一个进程(称之为进程A),它启动进程B的几个实例。当在gdb中调试进程A时,如果我使用Ctrl + C暂停进程A和一个SIGINT,所有子进程被杀死,所以我一旦我完成调试过程,我必须重新启动整个事情A.有没有办法阻止gdb向子进程发送SIGINT,从而杀死它们(至少我认为这是发生了什么)? 如果是这样,它是什么?

请注意,我没有进程B的源代码(因此我无法添加一些代码来处理SIGINT)。 进程接口使用C ++。


I have a process (call it process A) which kicks off several instances of process B. When debugging process A in gdb, if I use Ctrl+C to pause process A with a SIGINT, all the child B processes get killed, so I have to restart the whole thing once I'm done debugging process A. Is there a way to prevent gdb from sending SIGINT to the child processes, thus killing them (at least I assume that's what's happening)? If so, what is it?

Note that I do NOT have the source code for process B (so I cannot add some code to handle SIGINT). The process interfaces are in C++.


原文:https://stackoverflow.com/questions/38404925
更新时间:2024-02-16 22:02

最满意答案

尝试这个 -

getListView().setDivider(new ColorDrawable(Color.BLUE));
getListView().setDividerHeight(1);

Try this -

getListView().setDivider(new ColorDrawable(Color.BLUE));
getListView().setDividerHeight(1);

相关问答

更多
  • 我设法解决了这个问题。 该解决方案包括两个步骤。 首先,我将颜色(应该是激活项的颜色)应用到整个ListView作为背景颜色: @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); getListView().setBackgroundColor(getResources().getColor(R.color. ...
  • 尝试这个; 在将新的数据列表添加到现有列表之前,请使用list.clear(); 将新数据添加到列表中,您应该只在列表中添加新数据。 将列表传递给适配器类。 通知新数据的适配器,即adapter.notifyDataSetChanged() 你在getRows()中返回两次列表 在案例结构之前删除“返回列表” public void onActivityCreated(Bundle savedInstanceState){super.onActivityCreated(savedInstanceState) ...
  • 尝试这个 - getListView().setDivider(new ColorDrawable(Color.BLUE)); getListView().setDividerHeight(1); Try this - getListView().setDivider(new ColorDrawable(Color.BLUE)); getListView().setDividerHeight(1);
  • 非常感谢你的朋友们。 通过将onCreateView方法更改为onActivityCreated可以成功完成任务。 现在,该应用程序就像一个魅力。 谢谢。 Thank you so much friends. Task is successfully achieved by changing onCreateView method to onActivityCreated. Now the app works like a charm. Thanks.
  • 你应该在lv.setDivider(getActivity()。getResources()。getDrawable(android.R.color.black))之后使用lv.setDividerHeight(1)。 所以反转他们: lv.setDivider(getActivity().getResources().getDrawable(android.R.color.black)); lv.setDividerHeight(1); You should use lv.setDividerHeigh ...
  • 组合关闭时分隔线的颜色可以通过以下方式设置: android:divider 打开组合后分隔线的颜色。 孩子可见可以通过以下方式设置: android:childDivider The color of the divider line when a group is closed can be set via: android:divider The color of the divider lines when a group is opened aka. the child is visible ...
  • 如果要在Listview突出显示所选项目,请尝试这种方式。 这对我有用。 首先在使用setSelector(..)之前在Listfragment中设置Adapter。 setListAdapter(mAdapter); getListView().setSelector(R.drawable.fragment_listselector); fragment_listselector.xml
    你想要listSelector @android:color/transparent并将单个行视图的选择器设置为@color/selector_color well the solution to this was to implement a selector xml, where I added all the states of the list item:
    使用视图绑定器时,您无需夸大视图,SimpleCursorAdapter将为您完成。 您所要做的就是设置值(并且只有当它们不是常见值作为图像,连接字符串等时)。 注意:字符串,整数和默认的无格式值由默认视图绑定器设置。 您所需要的只是正确创建适配器。 实现ViewBinder时,作为新SimpleCursorAdapter参数插入的所有视图将作为视图值(arg0)的参数以及光标(右行中的arg1)和列(arg2)传递给您。 尝试这样的事情: public boolean setViewValue(View ...
  • 在问之前你做过一些研究吗? 无论如何,它可以通过重写onListItemClick方法来完成,如下所示: public class Test extends ListFragment { @Override public void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); //do the st ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。